Authors:Jared Jurkiewicz
Developers:Jared Jurkiewicz

Have you ever wanted to print the contents contained within the editor? If so, then this plugin is for you. It’s a simple plugin that adds ‘Print’ support to the editor toolbar.


Once required in and enabled, this plugin provides the following features to dijit.Editor.

  • Button with icon in toolbar for Printing the contents of the RTE only


Basic Usage

Usage of this plugin is quite simple and painless. The first thing you need to do is require into the page you’re using the editor. This is done in the same spot as your require() call is made, usually the head script tag. For example:

require(["dojo/parser", "dijit/Editor", "dijit/_editor/plugins/Print"]);

Once it has been required in, all you have to do is include it in the list of extraPlugins (or the plugins property if you’re reorganizing the toolbar) for you want to load into the editor. For example:

<div data-dojo-type="dijit/Editor" id="editor" data-dojo-props="extraPlugins:['print']"></div>

And that’s it. The editor instance you can reference by ‘dijit.byId(“editor”)’ is now enabled with the Print plugin! You can use the button to print the editor contents when you wish.


Basic Usage

require(["dojo/parser", "dijit/Editor", "dijit/_editor/plugins/Print"]);
<b>Enter some text then press the print button.  The browser print dialog should open and allow you to print the editor content</b>
<br />
<div data-dojo-type="dijit/Editor" height="250px" id="input" data-dojo-props="extraPlugins:['print']">
        <br />
        blah blah & blah!
        <br />
    <br />
                <td style="border-style:solid; border-width: 2px; border-color: gray;">One cell</td>
                <td style="border-style:solid; border-width: 2px; border-color: gray;">Two cell</td>
        <li>item one</li>
        <li>item two</li>
Error in the documentation? Can’t find what you are looking for? Let us know!