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

[Solved] ¿Printing in editor?

2 Answers 90 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
dejavu
Top achievements
Rank 2
dejavu asked on 10 Nov 2011, 04:27 PM
Hi,

Is this possible?, I need to print editor's content, just like user sees it. I know capturing current HTML is possible, but I don't know if there's a simple way to get a successful printing in a more direct way.

Would be great as a feature I believe in future control releases.

Regards.

2 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 14 Nov 2011, 11:44 AM
Such functionality can be implemented as a custom command like this:

// add a custom tool in the toolbar
.Custom(settings => settings.HtmlAttributes(new { @class = "t-print" }))

// print the editor document when the tool is clicked
$('.t-print').click(function printContents(e) {
        e.stopPropagation();
        e.preventDefault();

        var editor = $('#Editor').data('tEditor');
        editor.window.print();
    });


Greetings,
Alex Gyoshev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
dejavu
Top achievements
Rank 2
answered on 17 Nov 2011, 04:32 PM
Thanks. I'll mark this as a response.

Regards.
Tags
Editor
Asked by
dejavu
Top achievements
Rank 2
Answers by
Alex Gyoshev
Telerik team
dejavu
Top achievements
Rank 2
Share this question
or