2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
10 CKEDITOR.plugins.add( 'print',
12 init : function( editor )
14 var pluginName = 'print';
16 // Register the command.
17 var command = editor.addCommand( pluginName, CKEDITOR.plugins.print );
19 // Register the toolbar button.
20 editor.ui.addButton( 'Print',
22 label : editor.lang.print,
28 CKEDITOR.plugins.print =
30 exec : function( editor )
32 if ( CKEDITOR.env.opera )
34 else if ( CKEDITOR.env.gecko )
35 editor.window.$.print();
37 editor.document.$.execCommand( "Print" );
41 modes : { wysiwyg : !( CKEDITOR.env.opera ) } // It is imposible to print the inner document in Opera.