Mimimum syndical pour en faire un produit zope / cmf.
[ckeditor.git] / skins / ckeditor / _source / plugins / print / plugin.js
diff --git a/skins/ckeditor/_source/plugins/print/plugin.js b/skins/ckeditor/_source/plugins/print/plugin.js
new file mode 100644 (file)
index 0000000..cc26932
--- /dev/null
@@ -0,0 +1,42 @@
+/*\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
+       readOnly : 1,\r
+       modes : { wysiwyg : !( CKEDITOR.env.opera ) }           // It is imposible to print the inner document in Opera.\r
+};\r