The HTML Editor control does not have print feature built-in but it is very easy to implement it with JavaScript. The following code opens a new window (the printer friendly version), write the Editor contents into the window and then call the window's print method to invoke the print dialog:
Code: JavaScript
function print_editor_content()
{
//Get the editor object
var editor = eo_GetObject("Editor1");
//Open the new "printer friendly" window
var wnd = window.open("", "whatever");
//Write some basic HTML code into the page
//Most likely you will need to change this part,
//such as including your custom styles, etc
wnd.document.open();
wnd.document.write("<html>");
wnd.document.write("<head>");
wnd.document.write("<title>Print Editor Content</title>");
wnd.document.write("</head>");
wnd.document.write("<body>");
//Write the editor content
wnd.document.write(editor.getHtml());
//Close the document
wnd.document.write("</body>");
wnd.document.write("</html>");
wnd.document.close();
//Invoke the print dialog
wnd.print();
}
The Editor does not have print built-in because people rarely want to print just the editor contents alone. So most of the time user will need to customize the header and other page contents that appears along with the editor content.
Thanks!