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