2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
6 CKEDITOR.plugins.add( 'find',
\r
8 init : function( editor )
\r
10 var forms = CKEDITOR.plugins.find;
\r
11 editor.ui.addButton( 'Find',
\r
13 label : editor.lang.findAndReplace.find,
\r
16 var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) );
\r
17 findCommand.canUndo = false;
\r
19 editor.ui.addButton( 'Replace',
\r
21 label : editor.lang.findAndReplace.replace,
\r
24 var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) );
\r
25 replaceCommand.canUndo = false;
\r
27 CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' );
\r
28 CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' );
\r
31 requires : [ 'styles' ]
\r
35 * Defines the style to be used to highlight results with the find dialog.
\r
37 * @default { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } }
\r
39 * // Highlight search results with blue on yellow.
\r
40 * config.find_highlight =
\r
43 * styles : { 'background-color' : '#ff0', 'color' : '#00f' }
\r
46 CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
\r