4 * Copyright 2009, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://tinymce.moxiecode.com/license
8 * Contributing: http://tinymce.moxiecode.com/contributing
12 tinymce
.create('tinymce.plugins.SearchReplacePlugin', {
13 init : function(ed
, url
) {
15 // Keep IE from writing out the f/r character to the editor
16 // instance while initializing a new dialog. See: #3131190
19 ed
.windowManager
.open({
20 file
: url
+ '/searchreplace.htm',
21 width
: 420 + parseInt(ed
.getLang('searchreplace.delta_width', 0)),
22 height
: 170 + parseInt(ed
.getLang('searchreplace.delta_height', 0)),
27 search_string
: ed
.selection
.getContent({format
: 'text'}),
33 ed
.addCommand('mceSearch', function() {
37 ed
.addCommand('mceReplace', function() {
42 ed
.addButton('search', {title
: 'searchreplace.search_desc', cmd
: 'mceSearch'});
43 ed
.addButton('replace', {title
: 'searchreplace.replace_desc', cmd
: 'mceReplace'});
45 ed
.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch');
48 getInfo : function() {
50 longname
: 'Search/Replace',
51 author
: 'Moxiecode Systems AB',
52 authorurl
: 'http://tinymce.moxiecode.com',
53 infourl
: 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
54 version
: tinymce
.majorVersion
+ "." + tinymce
.minorVersion
60 tinymce
.PluginManager
.add('searchreplace', tinymce
.plugins
.SearchReplacePlugin
);