This is a migrated thread and some comments may be shown as answers.

Extending Kendo Editor tools

1 Answer 190 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 09 May 2013, 08:33 PM
I basically want to know if I can extend the Editor to include a Print functionality via a button in the toolbar.

Edit: I will be using HTML helper of the Kendo Editor

Thx,
Aaron

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 13 May 2013, 08:40 AM
Hi Aaron,

The Editor provides a way to add custom toolbar buttons:

http://demos.kendoui.com/web/editor/custom-tools.html

In your case the exec function of the custom tool should perform something like this:

var editorContent = $(this).data("kendoEditor").document.documentElement.outerHTML,
    win = window.open(),
    doc = win.document;
 
doc.write(editorContent);
doc.close();
win.print();


Note that opening a new browser window may be prevented by the browser. You can consider outputting the Editor's content in the current window, which would replace the page content.

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
Aaron
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or