Update TinyMCE to 3.5.3, enable stripping of Word styles on paste
This commit is contained in:
parent
83404c2c80
commit
48790b7525
274 changed files with 25268 additions and 14504 deletions
0
webapp/web/js/tiny_mce/plugins/searchreplace/css/searchreplace.css
vendored
Executable file → Normal file
0
webapp/web/js/tiny_mce/plugins/searchreplace/css/searchreplace.css
vendored
Executable file → Normal file
2
webapp/web/js/tiny_mce/plugins/searchreplace/editor_plugin.js
vendored
Executable file → Normal file
2
webapp/web/js/tiny_mce/plugins/searchreplace/editor_plugin.js
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
|||
(function(){tinymce.create('tinymce.plugins.SearchReplacePlugin',{init:function(ed,url){function open(m){ed.windowManager.open({file:url+'/searchreplace.htm',width:420+parseInt(ed.getLang('searchreplace.delta_width',0)),height:160+parseInt(ed.getLang('searchreplace.delta_height',0)),inline:1,auto_focus:0},{mode:m,search_string:ed.selection.getContent({format:'text'}),plugin_url:url});};ed.addCommand('mceSearch',function(){open('search');});ed.addCommand('mceReplace',function(){open('replace');});ed.addButton('search',{title:'searchreplace.search_desc',cmd:'mceSearch'});ed.addButton('replace',{title:'searchreplace.replace_desc',cmd:'mceReplace'});ed.addShortcut('ctrl+f','searchreplace.search_desc','mceSearch');},getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('searchreplace',tinymce.plugins.SearchReplacePlugin);})();
|
||||
(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})();
|
15
webapp/web/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js
vendored
Executable file → Normal file
15
webapp/web/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js
vendored
Executable file → Normal file
|
@ -1,18 +1,25 @@
|
|||
/**
|
||||
* $Id: editor_plugin_src.js 686 2008-03-09 18:13:49Z spocke $
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.SearchReplacePlugin', {
|
||||
init : function(ed, url) {
|
||||
function open(m) {
|
||||
// Keep IE from writing out the f/r character to the editor
|
||||
// instance while initializing a new dialog. See: #3131190
|
||||
window.focus();
|
||||
|
||||
ed.windowManager.open({
|
||||
file : url + '/searchreplace.htm',
|
||||
width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)),
|
||||
height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
|
||||
height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
|
||||
inline : 1,
|
||||
auto_focus : 0
|
||||
}, {
|
||||
|
|
41
webapp/web/js/tiny_mce/plugins/searchreplace/js/searchreplace.js
vendored
Executable file → Normal file
41
webapp/web/js/tiny_mce/plugins/searchreplace/js/searchreplace.js
vendored
Executable file → Normal file
|
@ -2,14 +2,19 @@ tinyMCEPopup.requireLangPack();
|
|||
|
||||
var SearchReplaceDialog = {
|
||||
init : function(ed) {
|
||||
var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
||||
var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
||||
|
||||
this.switchMode(m);
|
||||
t.switchMode(m);
|
||||
|
||||
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
||||
|
||||
// Focus input field
|
||||
f[m + '_panel_searchstring'].focus();
|
||||
|
||||
mcTabs.onChange.add(function(tab_id, panel_id) {
|
||||
t.switchMode(tab_id.substring(0, tab_id.indexOf('_')));
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
switchMode : function(m) {
|
||||
|
@ -35,6 +40,11 @@ var SearchReplaceDialog = {
|
|||
searchNext : function(a) {
|
||||
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
|
||||
|
||||
if (tinymce.isIE11 && !window.find) {
|
||||
ed.windowManager.alert("This feature is not available in IE 11+. Upgrade TinyMCE to 4.x to get this functionallity back.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get input
|
||||
f = document.forms[0];
|
||||
s = f[m + '_panel_searchstring'].value;
|
||||
|
@ -42,18 +52,23 @@ var SearchReplaceDialog = {
|
|||
ca = f[m + '_panel_casesensitivebox'].checked;
|
||||
rs = f['replace_panel_replacestring'].value;
|
||||
|
||||
if (tinymce.isIE) {
|
||||
r = ed.getDoc().selection.createRange();
|
||||
}
|
||||
|
||||
if (s == '')
|
||||
return;
|
||||
|
||||
function fix() {
|
||||
// Correct Firefox graphics glitches
|
||||
// TODO: Verify if this is actually needed any more, maybe it was for very old FF versions?
|
||||
r = se.getRng().cloneRange();
|
||||
ed.getDoc().execCommand('SelectAll', false, null);
|
||||
se.setRng(r);
|
||||
};
|
||||
|
||||
function replace() {
|
||||
if (tinymce.isIE)
|
||||
ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE
|
||||
else
|
||||
ed.getDoc().execCommand('InsertHTML', false, rs);
|
||||
ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE
|
||||
};
|
||||
|
||||
// IE flags
|
||||
|
@ -67,11 +82,22 @@ var SearchReplaceDialog = {
|
|||
ed.selection.collapse(true);
|
||||
|
||||
if (tinymce.isIE) {
|
||||
ed.focus();
|
||||
r = ed.getDoc().selection.createRange();
|
||||
|
||||
while (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
replace();
|
||||
fo = 1;
|
||||
|
||||
if (b) {
|
||||
r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
|
||||
} else {
|
||||
// to avoid looping for ever in MSIE 9/10 when just
|
||||
// changing the case
|
||||
r.moveStart("character", rs.length);
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.storeSelection();
|
||||
|
@ -104,6 +130,9 @@ var SearchReplaceDialog = {
|
|||
return;
|
||||
|
||||
if (tinymce.isIE) {
|
||||
ed.focus();
|
||||
r = ed.getDoc().selection.createRange();
|
||||
|
||||
if (r.findText(s, b ? -1 : 1, fl)) {
|
||||
r.scrollIntoView();
|
||||
r.select();
|
||||
|
|
17
webapp/web/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js
vendored
Executable file → Normal file
17
webapp/web/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js
vendored
Executable file → Normal file
|
@ -1,16 +1 @@
|
|||
tinyMCE.addI18n('en.searchreplace_dlg',{
|
||||
searchnext_desc:"Find again",
|
||||
notfound:"The search has been completed. The search string could not be found.",
|
||||
search_title:"Find",
|
||||
replace_title:"Find/Replace",
|
||||
allreplaced:"All occurrences of the search string were replaced.",
|
||||
findwhat:"Find what",
|
||||
replacewith:"Replace with",
|
||||
direction:"Direction",
|
||||
up:"Up",
|
||||
down:"Down",
|
||||
mcase:"Match case",
|
||||
findnext:"Find next",
|
||||
replace:"Replace",
|
||||
replaceall:"Replace all"
|
||||
});
|
||||
tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"});
|
47
webapp/web/js/tiny_mce/plugins/searchreplace/searchreplace.htm
vendored
Executable file → Normal file
47
webapp/web/js/tiny_mce/plugins/searchreplace/searchreplace.htm
vendored
Executable file → Normal file
|
@ -7,29 +7,29 @@
|
|||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<script type="text/javascript" src="js/searchreplace.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
|
||||
<base target="_self" />
|
||||
</head>
|
||||
<body style="display:none;">
|
||||
<body style="display:none;" role="application" aria-labelledby="app_title">
|
||||
<span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
|
||||
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
||||
<li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
||||
<li id="search_tab" aria-controls="search_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
||||
<li id="replace_tab" aria-controls="replace_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="search_panel" class="panel">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td>
|
||||
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr>
|
||||
<td><label>{#searchreplace_dlg.direction}</label></td>
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr role="group" aria-labelledby="search_panel_backwards_label">
|
||||
<td><label id="search_panel_backwards_label">{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
|
@ -40,7 +40,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
|
@ -52,20 +52,20 @@
|
|||
</div>
|
||||
|
||||
<div id="replace_panel" class="panel">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
||||
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td>
|
||||
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
||||
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td>
|
||||
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" aria-required="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr>
|
||||
<td><label>{#searchreplace_dlg.direction}</label></td>
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
||||
<tr role="group" aria-labelledby="replace_panel_dir_label">
|
||||
<td><label id="replace_panel_dir_label">{#searchreplace_dlg.direction}</label></td>
|
||||
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
||||
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
||||
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
||||
|
@ -76,7 +76,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
||||
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
||||
|
@ -90,15 +90,10 @@
|
|||
</div>
|
||||
|
||||
<div class="mceActionPanel">
|
||||
<div style="float: left">
|
||||
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
||||
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
||||
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
||||
</div>
|
||||
|
||||
<div style="float: right">
|
||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
||||
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
||||
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
||||
<input type="button" id="cancel" name="close" value="{#close}" onclick="tinyMCEPopup.close();" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue