1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 CKEDITOR.plugins.add( 'find', 7 { 8 init : function( editor ) 9 { 10 var forms = CKEDITOR.plugins.find; 11 editor.ui.addButton( 'Find', 12 { 13 label : editor.lang.findAndReplace.find, 14 command : 'find' 15 }); 16 editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) ); 17 18 editor.ui.addButton( 'Replace', 19 { 20 label : editor.lang.findAndReplace.replace, 21 command : 'replace' 22 }); 23 editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) ); 24 25 CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' ); 26 CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' ); 27 }, 28 29 requires : [ 'styles' ] 30 } ); 31 32 // Styles for highlighting search results. 33 CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } }; 34