/home/aqcert/public_html/admin/tinymce/tests/plugins
NameSizeModeActions
filemanager/-0755rm
image/-0755rm
link/-0755rm
media/-0755rm
autolink.js36250644editdlrm
autosave.js24100644editdlrm
charmap.js17040644editdlrm
fullpage.js45890644editdlrm
image.js144030644editdlrm
importcss.js93920644editdlrm
jquery_initialization.js7940644editdlrm
jquery_plugin.js24680644editdlrm
legacyoutput.js25930644editdlrm
link.js42060644editdlrm
lists.js517630644editdlrm
media.js71360644editdlrm
noneditable.js13690644editdlrm
paste.js1113380644editdlrm
paste_images.js48990644editdlrm
paste_smart.js33510644editdlrm
searchreplace.js41480644editdlrm
spellchecker.js27000644editdlrm
table.js518340644editdlrm
textpattern.js26590644editdlrm
wordcount.js18780644editdlrm
Edit: /home/aqcert/public_html/admin/tinymce/tests/plugins/searchreplace.js (4148B)
module("tinymce.plugins.SearchReplace", { setupModule: function() { QUnit.stop(); tinymce.init({ selector: "textarea", plugins: "searchreplace", elements: "elm1", add_unload_trigger: false, skin: false, indent: false, disable_nodechange: true, valid_elements: 'b,i', init_instance_callback : function(ed) { window.editor = ed; tinymce.util.Delay.setTimeout(function() { QUnit.start(); }, 0); } }); } }); test('Find no match', function() { editor.getBody().innerHTML = 'a'; equal(0, editor.plugins.searchreplace.find('x')); }); test('Find single match', function() { editor.getBody().innerHTML = 'a'; equal(1, editor.plugins.searchreplace.find('a')); }); test('Find single match in multiple elements', function() { editor.getBody().innerHTML = 'text'; equal(1, editor.plugins.searchreplace.find('text')); }); test('Find single match, match case: true', function() { editor.getBody().innerHTML = 'a A'; equal(1, editor.plugins.searchreplace.find('A', true)); }); test('Find single match, whole words: true', function() { editor.getBody().innerHTML = 'a Ax'; equal(1, editor.plugins.searchreplace.find('a', false, true)); }); test('Find multiple matches', function() { editor.getBody().innerHTML = 'a b A'; equal(2, editor.plugins.searchreplace.find('a')); }); test('Find and replace single match', function() { editor.getBody().innerHTML = 'a'; editor.plugins.searchreplace.find('a'); ok(!editor.plugins.searchreplace.replace('x')); equal("

x

", editor.getContent()); }); test('Find and replace first in multiple matches', function() { editor.getBody().innerHTML = 'a b a'; editor.plugins.searchreplace.find('a'); ok(editor.plugins.searchreplace.replace('x')); equal("

x b a

", editor.getContent()); }); test('Find and replace all in multiple matches', function() { editor.getBody().innerHTML = 'a b a'; editor.plugins.searchreplace.find('a'); ok(!editor.plugins.searchreplace.replace('x', true, true)); equal("

x b x

", editor.getContent()); }); test('Find multiple matches, move to next and replace', function() { editor.getBody().innerHTML = 'a a'; equal(2, editor.plugins.searchreplace.find('a')); editor.plugins.searchreplace.next(); ok(!editor.plugins.searchreplace.replace('x')); equal("

a x

", editor.getContent()); }); test('Find and replace fragmented match', function() { editor.getBody().innerHTML = 'testtest'; editor.plugins.searchreplace.find('test'); ok(editor.plugins.searchreplace.replace('abc')); equal(editor.getContent(), "

abctest

"); }); test('Find and replace all fragmented matches', function() { editor.getBody().innerHTML = 'testtest'; editor.plugins.searchreplace.find('test'); ok(!editor.plugins.searchreplace.replace('abc', true, true)); equal(editor.getContent(), "

abcabc

"); }); test('Find multiple matches, move to next and replace backwards', function() { editor.getBody().innerHTML = 'a a'; equal(2, editor.plugins.searchreplace.find('a')); editor.plugins.searchreplace.next(); ok(editor.plugins.searchreplace.replace('x', false)); ok(!editor.plugins.searchreplace.replace('y', false)); equal("

y x

", editor.getContent()); }); test('Find multiple matches and unmark them', function() { editor.getBody().innerHTML = 'a b a'; equal(2, editor.plugins.searchreplace.find('a')); editor.plugins.searchreplace.done(); equal('a', editor.selection.getContent()); equal(0, editor.getBody().getElementsByTagName('span').length); }); test('Find multiple matches with pre blocks', function() { editor.getBody().innerHTML = 'abc
  abc  
abc'; equal(3, editor.plugins.searchreplace.find('b')); equal(Utils.normalizeHtml(editor.getBody().innerHTML), ( 'abc' + '
  abc  
' + 'abc' )); });