如何在 Kendo UI 编辑器中覆盖打印?
How override Print in Kendo UI Editor?
我使用了 Kendo UI 编辑器控件。没关系。
但我需要在打印前做同样的事情
如何覆盖 Kendo UI 编辑器中的打印功能?
@(Html.Kendo().Editor()
.Name("editor")
.Tools(tools => tools
.Clear()
.Bold().Italic().Underline().Strikethrough()
.JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
.InsertUnorderedList().InsertOrderedList()
.Outdent().Indent()
.CreateLink().Unlink()
.InsertImage()
.InsertFile()
.SubScript()
.SuperScript()
.TableEditing()
.ViewHtml()
.Formatting()
.CleanFormatting()
.FontName()
.FontSize()
.FontColor().BackColor()
.Print())
)</div>
我想覆盖打印选项
您可以在工具栏 (http://demos.telerik.com/kendo-ui/editor/custom-tools) 中创建自定义按钮,例如
.CustomButton(cb => cb.Name("Custom Primt").ToolTip("Do stuff then Print").Exec(@<text>
function(e) {
var editor = $(this).data("kendoEditor");
editor.exec("inserthtml", { value: "Printing this document..." });
editor.exec("print");
}
这会将 "Printing this document..." 添加到编辑器主体,然后调用编辑器上的打印功能。
我使用了 Kendo UI 编辑器控件。没关系。 但我需要在打印前做同样的事情 如何覆盖 Kendo UI 编辑器中的打印功能?
@(Html.Kendo().Editor()
.Name("editor")
.Tools(tools => tools
.Clear()
.Bold().Italic().Underline().Strikethrough()
.JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
.InsertUnorderedList().InsertOrderedList()
.Outdent().Indent()
.CreateLink().Unlink()
.InsertImage()
.InsertFile()
.SubScript()
.SuperScript()
.TableEditing()
.ViewHtml()
.Formatting()
.CleanFormatting()
.FontName()
.FontSize()
.FontColor().BackColor()
.Print())
)</div>
我想覆盖打印选项
您可以在工具栏 (http://demos.telerik.com/kendo-ui/editor/custom-tools) 中创建自定义按钮,例如
.CustomButton(cb => cb.Name("Custom Primt").ToolTip("Do stuff then Print").Exec(@<text>
function(e) {
var editor = $(this).data("kendoEditor");
editor.exec("inserthtml", { value: "Printing this document..." });
editor.exec("print");
}
这会将 "Printing this document..." 添加到编辑器主体,然后调用编辑器上的打印功能。