      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 		var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) );
     17 		findCommand.canUndo = false;
     18
     19 		editor.ui.addButton( 'Replace',
     20 			{
     21 				label : editor.lang.findAndReplace.replace,
     22 				command : 'replace'
     23 			});
     24 		var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) );
     25 		replaceCommand.canUndo = false;
     26
     27 		CKEDITOR.dialog.add( 'find',	this.path + 'dialogs/find.js' );
     28 		CKEDITOR.dialog.add( 'replace',	this.path + 'dialogs/find.js' );
     29 	},
     30
     31 	requires : [ 'styles' ]
     32 } );
     33
     34 // Styles for highlighting search results.
     35 CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
     36