[英]How override Print in Kendo UI Editor?
I used Kendo UI Editor control. 我使用了Kendo UI Editor控件。 IT is ok. 没关系。 But I need to do same events before Printing How override Print function in Kendo UI Editor ? 但是我需要在打印之前执行相同的事件。如何在Kendo UI Editor中覆盖打印功能?
@(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>
I would like to override Print option 我想覆盖打印选项
You can create a custom button in the tool bar ( http://demos.telerik.com/kendo-ui/editor/custom-tools ) with something like 您可以在工具栏中创建自定义按钮( 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");
}
Which will add "Printing this document..." to the editor body, then call the Print function on the editor. 它将在编辑器主体中添加“正在打印此文档...”,然后在编辑器上调用“打印”功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.