diff options
author | luxagraf <sng@luxagraf.net> | 2012-09-22 22:27:04 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2012-09-22 22:27:04 -0400 |
commit | efb623af0bcb47d510501c282e1326b11343a29c (patch) | |
tree | 3a35fb19f5eba3b219c65277a5fb712cbe9604ac /lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste | |
parent | 0b481fd7931c2ae20ca21f89a87f2ba6a6c01e10 (diff) |
site reorg
Diffstat (limited to 'lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste')
11 files changed, 0 insertions, 599 deletions
diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm deleted file mode 100644 index f841206..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm +++ /dev/null @@ -1,22 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<title>blank_page</title> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> -<link href="css/blank.css" rel="stylesheet" type="text/css" /> -<base target="_self" /> -<script type="text/javascript"> -function init() { - if (parent.tinymce.isIE) - document.body.contentEditable = true; - else - document.designMode = 'on'; - - parent.initIframe(document); - window.focus(); -} -</script> -</head> -<body onload="init();"> - -</body> -</html> diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css deleted file mode 100644 index f1ab113..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css +++ /dev/null @@ -1,14 +0,0 @@ -html, body {height:98%} -body { -background-color: #FFFFFF; -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size: 10px; -scrollbar-3dlight-color: #F0F0EE; -scrollbar-arrow-color: #676662; -scrollbar-base-color: #F0F0EE; -scrollbar-darkshadow-color: #DDDDDD; -scrollbar-face-color: #E0E0DD; -scrollbar-highlight-color: #F0F0EE; -scrollbar-shadow-color: #F0F0EE; -scrollbar-track-color: #F5F5F5; -} diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css deleted file mode 100644 index 77685fd..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css +++ /dev/null @@ -1,3 +0,0 @@ -.sourceIframe { - border: 1px solid #808080; -} diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js deleted file mode 100644 index 2224455..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.PastePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mcePasteText',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pastetext.htm',width:450,height:450,inline:1},{plugin_url:url});}else t._insertText(clipboardData.getData("Text"),true);}else t._insertText(v.html,v.linebreaks);});ed.addCommand('mcePasteWord',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pasteword.htm',width:720,height:580,inline:1},{plugin_url:url});}else t._insertText(t._clipboardHTML());}else t._insertWordContent(v);});ed.addCommand('mceSelectAll',function(){ed.execCommand('selectall');});ed.addButton('pastetext',{title:'paste.paste_text_desc',cmd:'mcePasteText',ui:true});ed.addButton('pasteword',{title:'paste.paste_word_desc',cmd:'mcePasteWord',ui:true});ed.addButton('selectall',{title:'paste.selectall_desc',cmd:'mceSelectAll'});if(ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onPaste.add(function(ed,e){return t._handlePasteEvent(e)});}if(!tinymce.isIE&&ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onKeyDown.add(function(ed,e){if(e.ctrlKey&&e.keyCode==86){window.setTimeout(function(){ed.execCommand("mcePasteText",true);},1);Event.cancel(e);}});}},getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_handlePasteEvent:function(e){var html=this._clipboardHTML(),ed=this.editor,sel=ed.selection,r;if(ed&&(r=sel.getRng())&&r.text.length>0)ed.execCommand('delete');if(html&&html.length>0)ed.execCommand('mcePasteWord',false,html);return Event.cancel(e);},_insertText:function(content,bLinebreaks){content=this.editor.dom.encode(content);if(content&&content.length>0){if(!this.editor.selection.isCollapsed())this.editor.execCommand("Delete");if(bLinebreaks){if(this.editor.getParam("paste_create_paragraphs",true)){var rl=this.editor.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);content=content.replace(/\r\n\r\n/g,'</p><p>');content=content.replace(/\r\r/g,'</p><p>');content=content.replace(/\n\n/g,'</p><p>');if((pos=content.indexOf('</p><p>'))!=-1){this.editor.execCommand("Delete");var node=this.editor.selection.getNode();var breakElms=[];do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="</p>";before+=content.substring(0,pos);for(var i=0;i<breakElms.length;i++){before+="</"+breakElms[i].nodeName+">";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="<p>";content=before+content.substring(pos+7)+after;}}if(this.editor.getParam("paste_create_linebreaks",true)){content=content.replace(/\r\n/g,'<br />');content=content.replace(/\r/g,'<br />');content=content.replace(/\n/g,'<br />');}}this.editor.execCommand("mceInsertRawHTML",false,content);}},_insertWordContent:function(content){var t=this,ed=t.editor;if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','before',content);var rl=ed.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>','gi'),'<p><b>$1</b></p>');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)<BR>","gi"),"<p>"+middot+"$1</p>");content=content.replace(new RegExp('<SPAN style="mso-list: Ignore">','gi'),"<span>"+bull);content=content.replace(/<o:p><\/o:p>/gi,"");content=content.replace(new RegExp('<br style="page-break-before: always;.*>','gi'),'-- page break --');content=content.replace(/<!--([\s\S]*?)-->|<style>[\s\S]*?<\/style>/g,"");content=content.replace(/<(meta|link)[^>]+>/g,"");if(this.editor.getParam("paste_remove_spans",true))content=content.replace(/<\/?span[^>]*>/gi,"");if(this.editor.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(this.editor.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+this._reEscape(""+document.location)+'','gi'),'href="'+this.editor.documentBaseURI.getURI());content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*<p> <\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!this.editor.getParam('force_p_newlines')){content=content.replace('','','gi');content=content.replace('</p>','<br /><br />','gi');}if(!tinymce.isIE&&!this.editor.getParam('force_p_newlines')){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(this.editor.getParam("paste_convert_middot_lists",true)){var div=ed.dom.create("div",null,content);var className=this.editor.getParam("paste_unindented_list_class","unIndentedList");while(this._convertMiddots(div,"--list--"));while(this._convertMiddots(div,middot,className));while(this._convertMiddots(div,bull));content=div.innerHTML;}if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/<h[1-6]> <\/h[1-6]>/gi,'<p> </p>');content=content.replace(/<h[1-6]>/gi,'<p><b>');content=content.replace(/<\/h[1-6]>/gi,'</b></p>');content=content.replace(/<b> <\/b>/gi,'<b> </b>');content=content.replace(/^( )*/gi,'');}content=content.replace(/--list--/gi,"");if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','after',content);this.editor.execCommand("mceInsertContent",false,content);if(this.editor.getParam('paste_force_cleanup_wordpaste',true)){var ed=this.editor;window.setTimeout(function(){ed.execCommand("mceCleanup");},1);}}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i<s.length;i++){var c=s.charAt(i);if(l.indexOf(c)!=-1)o+='\\'+c;else o+=c;}return o;},_convertMiddots:function(div,search,class_name){var ed=this.editor,mdot=String.fromCharCode(183),bull=String.fromCharCode(8226);var nodes,prevul,i,p,ul,li,np,cp,li;nodes=div.getElementsByTagName("p");for(i=0;i<nodes.length;i++){p=nodes[i];if(p.innerHTML.indexOf(search)==0){ul=ed.dom.create("ul");if(class_name)ul.className=class_name;li=ed.dom.create("li");li.innerHTML=p.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--| ',"gi"),'');ul.appendChild(li);np=p.nextSibling;while(np){if(np.nodeType==3&&new RegExp('^\\s$','m').test(np.nodeValue)){np=np.nextSibling;continue;}if(search==mdot){if(np.nodeType==1&&new RegExp('^o(\\s+| )').test(np.innerHTML)){if(!prevul){prevul=ul;ul=ed.dom.create("ul");prevul.appendChild(ul);}np.innerHTML=np.innerHTML.replace(/^o/,'');}else{if(prevul){ul=prevul;prevul=null;}if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break;}}else{if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break;}cp=np.nextSibling;li=ed.dom.create("li");li.innerHTML=np.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--| ',"gi"),'');np.parentNode.removeChild(np);ul.appendChild(li);np=cp;}p.parentNode.replaceChild(ul,p);return true;}}return false;},_clipboardHTML:function(){var div=document.getElementById('_TinyMCE_clipboardHTML');if(!div){var div=document.createElement('DIV');div.id='_TinyMCE_clipboardHTML';with(div.style){visibility='hidden';overflow='hidden';position='absolute';width=1;height=1;}document.body.appendChild(div);}div.innerHTML='';var rng=document.body.createTextRange();rng.moveToElementText(div);rng.execCommand('Paste');var html=div.innerHTML;div.innerHTML='';return html;}});tinymce.PluginManager.add('paste',tinymce.plugins.PastePlugin);})();
\ No newline at end of file diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js deleted file mode 100644 index ab6da9e..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js +++ /dev/null @@ -1,394 +0,0 @@ -/** - * $Id: editor_plugin_src.js 919 2008-09-08 20:31:23Z spocke $ - * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. - */ - -(function() { - var Event = tinymce.dom.Event; - - tinymce.create('tinymce.plugins.PastePlugin', { - init : function(ed, url) { - var t = this; - - t.editor = ed; - - // Register commands - ed.addCommand('mcePasteText', function(ui, v) { - if (ui) { - if ((ed.getParam('paste_use_dialog', true)) || (!tinymce.isIE)) { - ed.windowManager.open({ - file : url + '/pastetext.htm', - width : 450, - height : 450, - inline : 1 - }, { - plugin_url : url - }); - } else - t._insertText(clipboardData.getData("Text"), true); - } else - t._insertText(v.html, v.linebreaks); - }); - - ed.addCommand('mcePasteWord', function(ui, v) { - if (ui) { - if ((ed.getParam('paste_use_dialog', true)) || (!tinymce.isIE)) { - ed.windowManager.open({ - file : url + '/pasteword.htm', - width : 450, - height : 450, - inline : 1 - }, { - plugin_url : url - }); - } else - t._insertText(t._clipboardHTML()); - } else - t._insertWordContent(v); - }); - - ed.addCommand('mceSelectAll', function() { - ed.execCommand('selectall'); - }); - - // Register buttons - ed.addButton('pastetext', {title : 'paste.paste_text_desc', cmd : 'mcePasteText', ui : true}); - ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord', ui : true}); - ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'mceSelectAll'}); - - if (ed.getParam("paste_auto_cleanup_on_paste", false)) { - ed.onPaste.add(function(ed, e) { - return t._handlePasteEvent(e) - }); - } - - if (!tinymce.isIE && ed.getParam("paste_auto_cleanup_on_paste", false)) { - // Force paste dialog if non IE browser - ed.onKeyDown.add(function(ed, e) { - if (e.ctrlKey && e.keyCode == 86) { - window.setTimeout(function() { - ed.execCommand("mcePasteText", true); - }, 1); - - Event.cancel(e); - } - }); - } - }, - - getInfo : function() { - return { - longname : 'Paste text/word', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Private methods - - _handlePasteEvent : function(e) { - var html = this._clipboardHTML(), ed = this.editor, sel = ed.selection, r; - - // Removes italic, strong etc, the if was needed due to bug #1437114 - if (ed && (r = sel.getRng()) && r.text.length > 0) - ed.execCommand('delete'); - - if (html && html.length > 0) - ed.execCommand('mcePasteWord', false, html); - - return Event.cancel(e); - }, - - _insertText : function(content, bLinebreaks) { - content = this.editor.dom.encode(content); - - if (content && content.length > 0) { - // Delete any highlighted text before pasting - if (!this.editor.selection.isCollapsed()) - this.editor.execCommand("Delete"); - - if (bLinebreaks) { - // Special paragraph treatment - if (this.editor.getParam("paste_create_paragraphs", true)) { - var rl = this.editor.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i<rl.length; i+=2) - content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]); - - content = content.replace(/\r\n\r\n/g, '</p><p>'); - content = content.replace(/\r\r/g, '</p><p>'); - content = content.replace(/\n\n/g, '</p><p>'); - - // Has paragraphs - if ((pos = content.indexOf('</p><p>')) != -1) { - this.editor.execCommand("Delete"); - - var node = this.editor.selection.getNode(); - - // Get list of elements to break - var breakElms = []; - - do { - if (node.nodeType == 1) { - // Don't break tables and break at body - if (node.nodeName == "TD" || node.nodeName == "BODY") - break; - - breakElms[breakElms.length] = node; - } - } while(node = node.parentNode); - - var before = "", after = "</p>"; - before += content.substring(0, pos); - - for (var i=0; i<breakElms.length; i++) { - before += "</" + breakElms[i].nodeName + ">"; - after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; - } - - before += "<p>"; - content = before + content.substring(pos+7) + after; - } - } - - if (this.editor.getParam("paste_create_linebreaks", true)) { - content = content.replace(/\r\n/g, '<br />'); - content = content.replace(/\r/g, '<br />'); - content = content.replace(/\n/g, '<br />'); - } - } - - this.editor.execCommand("mceInsertRawHTML", false, content); - } - }, - - _insertWordContent : function(content) { - var t = this, ed = t.editor; - - if (content && content.length > 0) { - // Cleanup Word content - var bull = String.fromCharCode(8226); - var middot = String.fromCharCode(183); - - if (ed.getParam('paste_insert_word_content_callback')) - content = ed.execCallback('paste_insert_word_content_callback', 'before', content); - - var rl = ed.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i<rl.length; i+=2) - content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]); - - if (this.editor.getParam("paste_convert_headers_to_strong", false)) { - content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>'); - } - - content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); - content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>"); - content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list - content = content.replace(/<o:p><\/o:p>/gi, ""); - content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks - content = content.replace(/<!--([\s\S]*?)-->|<style>[\s\S]*?<\/style>/g, ""); // Word comments - content = content.replace(/<(meta|link)[^>]+>/g, ""); // Header elements - - if (this.editor.getParam("paste_remove_spans", true)) - content = content.replace(/<\/?span[^>]*>/gi, ""); - - if (this.editor.getParam("paste_remove_styles", true)) - content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3"); - - content = content.replace(/<\/?font[^>]*>/gi, ""); - - // Strips class attributes. - switch (this.editor.getParam("paste_strip_class_attributes", "all")) { - case "all": - content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); - break; - - case "mso": - content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); - break; - } - - content = content.replace(new RegExp('href="?' + this._reEscape("" + document.location) + '', 'gi'), 'href="' + this.editor.documentBaseURI.getURI()); - content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); - content = content.replace(/<\\?\?xml[^>]*>/gi, ""); - content = content.replace(/<\/?\w+:[^>]*>/gi, ""); - content = content.replace(/-- page break --\s*<p> <\/p>/gi, ""); // Remove pagebreaks - content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks - - // content = content.replace(/\/? */gi, ""); - // content = content.replace(/<p> <\/p>/gi, ''); - - if (!this.editor.getParam('force_p_newlines')) { - content = content.replace('', '' ,'gi'); - content = content.replace('</p>', '<br /><br />' ,'gi'); - } - - if (!tinymce.isIE && !this.editor.getParam('force_p_newlines')) { - content = content.replace(/<\/?p[^>]*>/gi, ""); - } - - content = content.replace(/<\/?div[^>]*>/gi, ""); - - // Convert all middlot lists to UL lists - if (this.editor.getParam("paste_convert_middot_lists", true)) { - var div = ed.dom.create("div", null, content); - - // Convert all middot paragraphs to li elements - var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList"); - - while (this._convertMiddots(div, "--list--")) ; // bull - while (this._convertMiddots(div, middot, className)) ; // Middot - while (this._convertMiddots(div, bull)) ; // bull - - content = div.innerHTML; - } - - // Replace all headers with strong and fix some other issues - if (this.editor.getParam("paste_convert_headers_to_strong", false)) { - content = content.replace(/<h[1-6]> <\/h[1-6]>/gi, '<p> </p>'); - content = content.replace(/<h[1-6]>/gi, '<p><b>'); - content = content.replace(/<\/h[1-6]>/gi, '</b></p>'); - content = content.replace(/<b> <\/b>/gi, '<b> </b>'); - content = content.replace(/^( )*/gi, ''); - } - - content = content.replace(/--list--/gi, ""); // Remove --list-- - - if (ed.getParam('paste_insert_word_content_callback')) - content = ed.execCallback('paste_insert_word_content_callback', 'after', content); - - // Insert cleaned content - this.editor.execCommand("mceInsertContent", false, content); - - if (this.editor.getParam('paste_force_cleanup_wordpaste', true)) { - var ed = this.editor; - - window.setTimeout(function() { - ed.execCommand("mceCleanup"); - }, 1); // Do normal cleanup detached from this thread - } - } - }, - - _reEscape : function(s) { - var l = "?.\\*[](){}+^$:"; - var o = ""; - - for (var i=0; i<s.length; i++) { - var c = s.charAt(i); - - if (l.indexOf(c) != -1) - o += '\\' + c; - else - o += c; - } - - return o; - }, - - _convertMiddots : function(div, search, class_name) { - var ed = this.editor, mdot = String.fromCharCode(183), bull = String.fromCharCode(8226); - var nodes, prevul, i, p, ul, li, np, cp, li; - - nodes = div.getElementsByTagName("p"); - for (i=0; i<nodes.length; i++) { - p = nodes[i]; - - // Is middot - if (p.innerHTML.indexOf(search) == 0) { - ul = ed.dom.create("ul"); - - if (class_name) - ul.className = class_name; - - // Add the first one - li = ed.dom.create("li"); - li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), ''); - ul.appendChild(li); - - // Add the rest - np = p.nextSibling; - while (np) { - // If the node is whitespace, then - // ignore it and continue on. - if (np.nodeType == 3 && new RegExp('^\\s$', 'm').test(np.nodeValue)) { - np = np.nextSibling; - continue; - } - - if (search == mdot) { - if (np.nodeType == 1 && new RegExp('^o(\\s+| )').test(np.innerHTML)) { - // Second level of nesting - if (!prevul) { - prevul = ul; - ul = ed.dom.create("ul"); - prevul.appendChild(ul); - } - np.innerHTML = np.innerHTML.replace(/^o/, ''); - } else { - // Pop the stack if we're going back up to the first level - if (prevul) { - ul = prevul; - prevul = null; - } - // Not element or middot paragraph - if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0) - break; - } - } else { - // Not element or middot paragraph - if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0) - break; - } - - cp = np.nextSibling; - li = ed.dom.create("li"); - li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), ''); - np.parentNode.removeChild(np); - ul.appendChild(li); - np = cp; - } - - p.parentNode.replaceChild(ul, p); - - return true; - } - } - - return false; - }, - - _clipboardHTML : function() { - var div = document.getElementById('_TinyMCE_clipboardHTML'); - - if (!div) { - var div = document.createElement('DIV'); - div.id = '_TinyMCE_clipboardHTML'; - - with (div.style) { - visibility = 'hidden'; - overflow = 'hidden'; - position = 'absolute'; - width = 1; - height = 1; - } - - document.body.appendChild(div); - } - - div.innerHTML = ''; - var rng = document.body.createTextRange(); - rng.moveToElementText(div); - rng.execCommand('Paste'); - var html = div.innerHTML; - div.innerHTML = ''; - return html; - } - }); - - // Register plugin - tinymce.PluginManager.add('paste', tinymce.plugins.PastePlugin); -})();
\ No newline at end of file diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js deleted file mode 100644 index 2807387..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js +++ /dev/null @@ -1,42 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -function saveContent() { - if (document.forms[0].htmlSource.value == '') { - tinyMCEPopup.close(); - return false; - } - - tinyMCEPopup.execCommand('mcePasteText', false, { - html : document.forms[0].htmlSource.value, - linebreaks : document.forms[0].linebreaks.checked - }); - - tinyMCEPopup.close(); -} - -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); - - // Remove Gecko spellchecking - if (tinymce.isGecko) - document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); - - resizeInputs(); -} - -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; - -function resizeInputs() { - if (!tinymce.isIE) { - wHeight = self.innerHeight-80; - wWidth = self.innerWidth-17; - } else { - wHeight = document.body.clientHeight-80; - wWidth = document.body.clientWidth-17; - } - - document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; - document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; -} - -tinyMCEPopup.onInit.add(onLoadInit);
\ No newline at end of file diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js deleted file mode 100644 index 3c7d6fe..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js +++ /dev/null @@ -1,56 +0,0 @@ -tinyMCEPopup.requireLangPack(); - -function saveContent() { - var html = document.getElementById("frmData").contentWindow.document.body.innerHTML; - - if (html == ''){ - tinyMCEPopup.close(); - return false; - } - - tinyMCEPopup.execCommand('mcePasteWord', false, html); - tinyMCEPopup.close(); -} - -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); - - // Fix for endless reloading in FF - window.setTimeout(createIFrame, 10); -} - -function createIFrame() { - document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" frameborder="0" dir="ltr" wrap="soft"></iframe>'; -} - -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; - -function initIframe(doc) { - var dir = tinyMCEPopup.editor.settings.directionality; - - doc.body.dir = dir; - - // Remove Gecko spellchecking - if (tinymce.isGecko) - doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); - - resizeInputs(); -} - -function resizeInputs() { - if (!tinymce.isIE) { - wHeight = self.innerHeight - 120; - wWidth = self.innerWidth - 42; - } else { - wHeight = document.body.clientHeight - 125; - wWidth = document.body.clientWidth - 42; - } - - var elm = document.getElementById('frmData'); - if (elm) { - elm.style.height = Math.abs(wHeight) + 'px'; - elm.style.width = Math.abs(wWidth) + 'px'; - } -} - -tinyMCEPopup.onInit.add(onLoadInit); diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/langs/de_dlg.js b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/langs/de_dlg.js deleted file mode 100644 index 5a3f5e8..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/langs/de_dlg.js +++ /dev/null @@ -1,5 +0,0 @@ -tinyMCE.addI18n('de.paste_dlg',{
-text_title:"Dr\u00FCcken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00FCgen.",
-text_linebreaks:"Zeilenumbr\u00FCche beibehalten",
-word_title:"Dr\u00FCcken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00FCgen."
-});
\ No newline at end of file diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js deleted file mode 100644 index 823eb16..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js +++ /dev/null @@ -1,5 +0,0 @@ -tinyMCE.addI18n('en.paste_dlg',{ -text_title:"Use CTRL+V on your keyboard to paste the text into the window.", -text_linebreaks:"Keep linebreaks", -word_title:"Use CTRL+V on your keyboard to paste the text into the window." -});
\ No newline at end of file diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm deleted file mode 100644 index 0e0d99f..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm +++ /dev/null @@ -1,34 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>{#paste.paste_text_desc}</title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - <script type="text/javascript" src="../../tiny_mce_popup.js"></script> - <script type="text/javascript" src="js/pastetext.js"></script> - <base target="_self" /> -</head> -<body onresize="resizeInputs();" style="display:none; overflow:hidden;"> -<form name="source" onsubmit="saveContent();return false;" action="#"> - <div style="float: left" class="title">{#paste.paste_text_desc}</div> - - <div style="float: right"> - <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label> - </div> - - <br style="clear: both" /> - - <div>{#paste_dlg.text_title}</div> - - <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea> - - <div class="mceActionPanel"> - <div style="float: left"> - <input type="submit" name="insert" value="{#insert}" id="insert" /> - </div> - - <div style="float: right"> - <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" /> - </div> - </div> -</form> -</body> -</html>
\ No newline at end of file diff --git a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm b/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm deleted file mode 100644 index f2dab70..0000000 --- a/lib/grappelli/media/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm +++ /dev/null @@ -1,23 +0,0 @@ -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - <title>{#paste.paste_word_desc}</title> - <script type="text/javascript" src="../../tiny_mce_popup.js"></script> - <script type="text/javascript" src="js/pasteword.js"></script> - <!-- <link href="css/pasteword.css" rel="stylesheet" type="text/css" /> --> - <base target="_self" /> -</head> -<body onresize="resizeInputs();" style="display:none; overflow:visible;"> - <form name="source" onsubmit="saveContent();" action="#"> - <div class="title">{#paste.paste_word_desc}</div> - <p class="helptext">{#paste_dlg.word_title}</p> - <div id="iframecontainer"></div> - <div class="mceActionPanel module submit-row"> - <ul class="submit-row"> - <li class="cancel-button-container left"><input type="button" id="cancel" class="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /></li> - <li class="submit-button-container"><input type="submit" id="insert" class="default" name="insert" value="{#insert}" onclick="saveContent();" /></li> - </ul> - </div> - </form> -</body> -</html> |