0

在此处输入图像描述 图像显示了 sprite.png 中没有图像的最后一个图标,我尝试添加字体真棒图标图像,即使它不起作用。我现在正在使用 kendo-ui 2021 版本。这是我正在使用的代码,我无法添加图标图像打印、清晰格式和复制格式。

****$("#a").kendoEditor({
            imageBrowser: {
                transport: {
                    read: "@Url.Action("Read", "Controllername")",
                    destroy: {
                        url: "@Url.Action("Destroy", "Controllername")",
                        type: "POST"
                    },
                    create: {
                        url: "@Url.Action("Create", "Controllername")",
                        type: "POST"
                    },
                    thumbnailUrl: "@Url.Action("Thumbnail", "Controllername")",
                    uploadUrl: "@Url.Action("Upload", "Controllername")",
                    imageUrl: "@Url.Action("Image?path={0}", "Controllername")",
                }
            },
            tools: [
                "formatting",
                "bold",
                "italic",
                "underline",
                "strikethrough",
                "justifyLeft",
                "justifyCenter",
                "justifyRight",
                "justifyFull",
                "insertUnorderedList",
                "insertOrderedList",
                "indent",
                "outdent",
                "createLink",
                "unlink",
                "insertImage",
                "subscript",
                "superscript",
                "tableWizard",
                "createTable",
                "addRowAbove",
                "addRowBelow",
                "addColumnLeft",
                "addColumnRight",
                "deleteRow",
                "deleteColumn",
                "foreColor",
                "backColor",
                "print"
            ],
            execute: function (e) {
                var editor = this;
                if (e.name == "createtable") {
                    setTimeout(function () {
                        var table = $(editor.body).find("table:not(.custom-table)");
                        table.addClass("custom-table");
                        table.attr("style", "border: 1px solid black;");
                        table.find("tr td")
                            .each(function () {
                                var currentStyle = $(this).attr("style");
                                $(this).attr("style", currentStyle + " border: 1px solid black; ");
                            });
                    }, 0);
                }                
            }           
        });****
4

1 回答 1

0

我曾尝试在剑道中使用客户工具,并将相关图像插入为 png 并在样式标签中提供图像 url。

kendoEditor 中的代码:

     $("#quest").kendoEditor({
       tools[{
                name: "print",
                tooltip: "print",
                exec: function (e) {
                }
            }

]

款式:

<style>

.k-editor .k-i-print {
 background: 50% 50% no-repeat 
              url(https://localhost/cisiweb2/image/master/print.png);
    }
</style>
于 2021-11-09T09:51:06.783 回答