/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\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
title : lang.title,\r
resizable : CKEDITOR.DIALOG_RESIZE_NONE,\r
minWidth : 350,\r
- minHeight : 165,\r
+ minHeight : 170,\r
buttons : [ CKEDITOR.dialog.cancelButton ], // Cancel button only.\r
contents : [\r
{\r
},\r
{\r
type : 'button',\r
+ id : 'btnFind',\r
align : 'left',\r
style : 'width:100%',\r
label : lang.find,\r
},\r
{\r
type : 'button',\r
+ id : 'btnFindReplace',\r
align : 'left',\r
style : 'width:100%',\r
label : lang.replace,\r
},\r
{\r
type : 'button',\r
+ id : 'btnReplaceAll',\r
align : 'left',\r
style : 'width:100%',\r
label : lang.replaceAll,\r
// Establish initial searching start position.\r
finder.searchRange = getSearchRange();\r
\r
+ // Fill in the find field with selected text.\r
+ var selectedText = this.getParentEditor().getSelection().getSelectedText(),\r
+ patternFieldId = ( startupPage == 'find' ? 'txtFindFind' : 'txtFindReplace' );\r
+\r
+ var field = this.getContentElement( startupPage, patternFieldId );\r
+ field.setValue( selectedText );\r
+ field.select();\r
+\r
this.selectPage( startupPage );\r
+\r
+ this[ ( startupPage == 'find' && this._.editor.readOnly? 'hide' : 'show' ) + 'Page' ]( 'replace');\r
},\r
onHide : function()\r
{\r