--- /dev/null
+/*\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+/**\r
+ * @file Print Plugin\r
+ */\r
+\r
+CKEDITOR.plugins.add( 'print',\r
+{\r
+ init : function( editor )\r
+ {\r
+ var pluginName = 'print';\r
+\r
+ // Register the command.\r
+ var command = editor.addCommand( pluginName, CKEDITOR.plugins.print );\r
+\r
+ // Register the toolbar button.\r
+ editor.ui.addButton( 'Print',\r
+ {\r
+ label : editor.lang.print,\r
+ command : pluginName\r
+ });\r
+ }\r
+} );\r
+\r
+CKEDITOR.plugins.print =\r
+{\r
+ exec : function( editor )\r
+ {\r
+ if ( CKEDITOR.env.opera )\r
+ return;\r
+ else if ( CKEDITOR.env.gecko )\r
+ editor.window.$.print();\r
+ else\r
+ editor.document.$.execCommand( "Print" );\r
+ },\r
+ canUndo : false,\r
+ modes : { wysiwyg : !( CKEDITOR.env.opera ) } // It is imposible to print the inner document in Opera.\r
+};\r