]> CRI, Mines Paris - PSL - ckeditor.git/blobdiff - skins/ckeditor/_source/plugins/find/plugin.js
Mimimum syndical pour en faire un produit zope / cmf.
[ckeditor.git] / skins / ckeditor / _source / plugins / find / plugin.js
diff --git a/skins/ckeditor/_source/plugins/find/plugin.js b/skins/ckeditor/_source/plugins/find/plugin.js
new file mode 100644 (file)
index 0000000..721fb5e
--- /dev/null
@@ -0,0 +1,47 @@
+/*\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
+CKEDITOR.plugins.add( 'find',\r
+{\r
+       init : function( editor )\r
+       {\r
+               var forms = CKEDITOR.plugins.find;\r
+               editor.ui.addButton( 'Find',\r
+                       {\r
+                               label : editor.lang.findAndReplace.find,\r
+                               command : 'find'\r
+                       });\r
+               var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) );\r
+               findCommand.canUndo = false;\r
+               findCommand.readOnly = 1;\r
+\r
+               editor.ui.addButton( 'Replace',\r
+                       {\r
+                               label : editor.lang.findAndReplace.replace,\r
+                               command : 'replace'\r
+                       });\r
+               var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) );\r
+               replaceCommand.canUndo = false;\r
+\r
+               CKEDITOR.dialog.add( 'find',    this.path + 'dialogs/find.js' );\r
+               CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' );\r
+       },\r
+\r
+       requires : [ 'styles' ]\r
+} );\r
+\r
+/**\r
+ * Defines the style to be used to highlight results with the find dialog.\r
+ * @type Object\r
+ * @default { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } }\r
+ * @example\r
+ * // Highlight search results with blue on yellow.\r
+ * config.find_highlight =\r
+ *     {\r
+ *         element : 'span',\r
+ *         styles : { 'background-color' : '#ff0', 'color' : '#00f' }\r
+ *     };\r
+ */\r
+CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };\r