Changeset 5629 for branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste
- Timestamp:
- 11/25/09 11:33:14 (2 years ago)
- Location:
- branches/Release01x00/TinyMCEPlugin/pub
- Files:
-
- 21 edited
-
. (modified) (1 prop)
-
System (modified) (1 prop)
-
System/TinyMCEPlugin (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/css (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js (modified) (1 diff, 1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/js (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/langs (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm (modified) (1 prop)
-
System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/Release01x00/TinyMCEPlugin/pub
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/blank.htm
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/css
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/css/blank.css
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/css/pasteword.css
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js
- Property eol-style:native set to data
r5312 r5629 1 (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.PastePlugin",{init:function(c,d){var e=this,b;e.editor=c;e.url=d;e.onPreProcess=new tinymce.util.Dispatcher(e);e.onPostProcess=new tinymce.util.Dispatcher(e);e.onPreProcess.add(e._preProcess);e.onPostProcess.add(e._postProcess);e.onPreProcess.add(function(h,i){c.execCallback("paste_preprocess",h,i)});e.onPostProcess.add(function(h,i){c.execCallback("paste_postprocess",h,i)});function g(i){var h=c.dom;e.onPreProcess.dispatch(e,i);i.node=h.create("div",0,i.content);e.onPostProcess.dispatch(e,i);i.content=c.serializer.serialize(i.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(i.content)){e._insertBlockContent(c,h,i.content)}else{e._insert(i.content)}}c.addCommand("mceInsertClipboardContent",function(h,i){g(i)});function f(l){var p,k,i,j=c.selection,o=c.dom,h=c.getBody(),m;if(o.get("_mcePaste")){return}p=o.add(h,"div",{id:"_mcePaste"},"\uFEFF");if(h!=c.getDoc().body){m=o.getPos(c.selection.getStart(),h).y}else{m=h.scrollTop}o.setStyles(p,{position:"absolute",left:-10000,top:m,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){i=o.doc.body.createTextRange();i.moveToElementText(p);i.execCommand("Paste");o.remove(p);if(p.innerHTML==="\uFEFF"){c.execCommand("mcePasteWord");l.preventDefault();return}g({content:p.innerHTML});return tinymce.dom.Event.cancel(l)}else{k=c.selection.getRng();p=p.firstChild;i=c.getDoc().createRange();i.setStart(p,0);i.setEnd(p,1);j.setRng(i);window.setTimeout(function(){var q="",n=o.select("div[id=_mcePaste]");a(n,function(r){q+=(o.select("> span.Apple-style-span div",r)[0]||o.select("> span.Apple-style-span",r)[0]||r).innerHTML});a(n,function(r){o.remove(r)});if(k){j.setRng(k)}g({content:q})},0)}}if(c.getParam("paste_auto_cleanup_on_paste",true)){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){c.onKeyDown.add(function(h,i){if(((tinymce.isMac?i.metaKey:i.ctrlKey)&&i.keyCode==86)||(i.shiftKey&&i.keyCode==45)){f(i)}})}else{c.onPaste.addToTop(function(h,i){return f(i)})}}if(c.getParam("paste_block_drop")){c.onInit.add(function(){c.dom.bind(c.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(h){h.preventDefault();h.stopPropagation();return false})})}e._legacySupport()},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}},_preProcess:function(d,i){var b=this.editor,c=i.content,g,f;function g(h){a(h,function(j){if(j.constructor==RegExp){c=c.replace(j,"")}else{c=c.replace(j[0],j[1])}})}if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(c)||i.wordContent){i.wordContent=true;g([/^\s*( )+/g,/( |<br[^>]*>)+\s*$/g]);if(b.getParam("paste_convert_middot_lists",true)){g([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<span[^>]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}g([/<!--[\s\S]+?-->/gi,/<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi,/<\\?\?xml[^>]*>/gi,/<\/?o:[^>]*>/gi,/ (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi,/ (id|name|language|type|on\w+|v:\w+)=(\w+)/gi,[/<(\/?)s>/gi,"<$1strike>"],/<script[^>]+>[\s\S]*?<\/script>/gi,[/ /g,"\u00a0"]]);if(!b.getParam("paste_retain_style_properties")){g([/<\/?(span)[^>]*>/gi])}}f=b.getParam("paste_strip_class_attributes");if(f!="none"){function e(l,h){var k,j="";if(f=="all"){return""}h=tinymce.explode(h," ");for(k=h.length-1;k>=0;k--){if(!/^(Mso)/i.test(h[k])){j+=(!j?"":" ")+h[k]}}return' class="'+j+'"'}g([[/ class=\"([^\"]*)\"/gi,e],[/ class=(\w+)/gi,e]])}if(b.getParam("paste_remove_spans")){g([/<\/?(span)[^>]*>/gi])}i.content=c},_postProcess:function(e,g){var d=this,c=d.editor,f=c.dom,b;if(g.wordContent){a(f.select("a",g.node),function(h){if(!h.href||h.href.indexOf("#_Toc")!=-1){f.remove(h,1)}});if(d.editor.getParam("paste_convert_middot_lists",true)){d._convertLists(e,g)}b=c.getParam("paste_retain_style_properties");if(tinymce.is(b,"string")){b=tinymce.explode(b)}a(f.select("*",g.node),function(l){var m={},j=0,k,n,h;if(b){for(k=0;k<b.length;k++){n=b[k];h=f.getStyle(l,n);if(h){m[n]=h;j++}}}f.setAttrib(l,"style","");if(b&&j>0){f.setStyles(l,m)}else{if(l.nodeName=="SPAN"&&!l.className){f.remove(l,true)}}})}if(c.getParam("paste_remove_styles")||(c.getParam("paste_remove_styles_if_webkit")&&tinymce.isWebKit)){a(f.select("*[style]",g.node),function(h){h.removeAttribute("style");h.removeAttribute("mce_style")})}else{if(tinymce.isWebKit){a(f.select("*",g.node),function(h){h.removeAttribute("mce_style")})}}},_convertLists:function(e,c){var g=e.editor.dom,f,j,b=-1,d,k=[],i,h;a(g.select("p",c.node),function(r){var n,s="",q,o,l,m;for(n=r.firstChild;n&&n.nodeType==3;n=n.nextSibling){s+=n.nodeValue}s=r.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(s)){q="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(s)){q="ol"}if(q){d=parseFloat(r.style.marginLeft||0);if(d>b){k.push(d)}if(!f||q!=i){f=g.create(q);g.insertAfter(f,r)}else{if(d>b){f=j.appendChild(g.create(q))}else{if(d<b){l=tinymce.inArray(k,d);m=g.getParents(f.parentNode,q);f=m[m.length-1-l]||f}}}a(g.select("span",r),function(t){var p=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(q=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){g.remove(t)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){g.remove(t)}}});o=r.innerHTML;if(q=="ul"){o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}j=f.appendChild(g.create("li",0,o));g.remove(r);b=d;i=q}else{f=b=0}});h=c.node.innerHTML;if(h.indexOf("__MCE_ITEM__")!=-1){c.node.innerHTML=h.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(h,e,i){var c,g,d=h.selection,m,j,b,k,f;function l(p){var o;if(tinymce.isIE){o=h.getDoc().body.createTextRange();o.moveToElementText(p);o.collapse(false);o.select()}else{d.select(p,1);d.collapse(false)}}this._insert('<span id="_marker"> </span>',1);g=e.get("_marker");c=e.getParent(g,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(c&&!/TD|TH/.test(c.nodeName)){g=e.split(c,g);a(e.create("div",0,i).childNodes,function(o){m=g.parentNode.insertBefore(o.cloneNode(true),g)});l(m)}else{e.setOuterHTML(g,i);d.select(h.getBody(),1);d.collapse(0)}e.remove("_marker");j=d.getStart();b=e.getViewPort(h.getWin());k=h.dom.getPos(j).y;f=j.clientHeight;if(k<b.y||k+f>b.y+b.h){h.getDoc().body.scrollTop=k<b.y?k:k-b.h+25}},_insert:function(d,b){var c=this.editor;if(!c.selection.isCollapsed()){c.getDoc().execCommand("Delete",false,null)}c.execCommand(tinymce.isGecko?"insertHTML":"mceInsertContent",false,d,{skip_undo:b})},_legacySupport:function(){var c=this,b=c.editor;a(["mcePasteText","mcePasteWord"],function(d){b.addCommand(d,function(){b.windowManager.open({file:c.url+(d=="mcePasteText"?"/pastetext.htm":"/pasteword.htm"),width:parseInt(b.getParam("paste_dialog_width","450")),height:parseInt(b.getParam("paste_dialog_height","400")),inline:1})})});b.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});b.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"});b.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); 1 (function(){var each=tinymce.each;tinymce.create('tinymce.plugins.PastePlugin',{init:function(ed,url){var t=this,cb;t.editor=ed;t.url=url;t.onPreProcess=new tinymce.util.Dispatcher(t);t.onPostProcess=new tinymce.util.Dispatcher(t);t.onPreProcess.add(t._preProcess);t.onPostProcess.add(t._postProcess);t.onPreProcess.add(function(pl,o){ed.execCallback('paste_preprocess',pl,o);});t.onPostProcess.add(function(pl,o){ed.execCallback('paste_postprocess',pl,o);});function process(o){var dom=ed.dom;t.onPreProcess.dispatch(t,o);o.node=dom.create('div',0,o.content);t.onPostProcess.dispatch(t,o);o.content=ed.serializer.serialize(o.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(o.content)) 2 t._insertBlockContent(ed,dom,o.content);else 3 t._insert(o.content);};ed.addCommand('mceInsertClipboardContent',function(u,o){process(o);});function grabContent(e){var n,or,rng,sel=ed.selection,dom=ed.dom,body=ed.getBody(),posY;if(dom.get('_mcePaste')) 4 return;n=dom.add(body,'div',{id:'_mcePaste'},'\uFEFF');if(body!=ed.getDoc().body) 5 posY=dom.getPos(ed.selection.getStart(),body).y;else 6 posY=body.scrollTop;dom.setStyles(n,{position:'absolute',left:-10000,top:posY,width:1,height:1,overflow:'hidden'});if(tinymce.isIE){rng=dom.doc.body.createTextRange();rng.moveToElementText(n);rng.execCommand('Paste');dom.remove(n);if(n.innerHTML==='\uFEFF'){ed.execCommand('mcePasteWord');e.preventDefault();return;} 7 process({content:n.innerHTML});return tinymce.dom.Event.cancel(e);}else{or=ed.selection.getRng();n=n.firstChild;rng=ed.getDoc().createRange();rng.setStart(n,0);rng.setEnd(n,1);sel.setRng(rng);window.setTimeout(function(){var h='',nl=dom.select('div[id=_mcePaste]');each(nl,function(n){h+=(dom.select('> span.Apple-style-span div',n)[0]||dom.select('> span.Apple-style-span',n)[0]||n).innerHTML;});each(nl,function(n){dom.remove(n);});if(or) 8 sel.setRng(or);process({content:h});},0);}};if(ed.getParam('paste_auto_cleanup_on_paste',true)){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){ed.onKeyDown.add(function(ed,e){if(((tinymce.isMac?e.metaKey:e.ctrlKey)&&e.keyCode==86)||(e.shiftKey&&e.keyCode==45)) 9 grabContent(e);});}else{ed.onPaste.addToTop(function(ed,e){return grabContent(e);});}} 10 if(ed.getParam('paste_block_drop')){ed.onInit.add(function(){ed.dom.bind(ed.getBody(),['dragend','dragover','draggesture','dragdrop','drop','drag'],function(e){e.preventDefault();e.stopPropagation();return false;});});} 11 t._legacySupport();},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};},_preProcess:function(pl,o){var ed=this.editor,h=o.content,process,stripClass;function process(items){each(items,function(v){if(v.constructor==RegExp) 12 h=h.replace(v,'');else 13 h=h.replace(v[0],v[1]);});};if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(h)||o.wordContent){o.wordContent=true;process([/^\s*( )+/g,/( |<br[^>]*>)+\s*$/g]);if(ed.getParam('paste_convert_middot_lists',true)){process([[/<!--\[if !supportLists\]-->/gi,'$&__MCE_ITEM__'],[/(<span[^>]+:\s*symbol[^>]+>)/gi,'$1__MCE_ITEM__'],[/(<span[^>]+mso-list:[^>]+>)/gi,'$1__MCE_ITEM__']]);} 14 process([/<!--[\s\S]+?-->/gi,/<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi,/<\\?\?xml[^>]*>/gi,/<\/?o:[^>]*>/gi,/ (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi,/ (id|name|language|type|on\w+|v:\w+)=(\w+)/gi,[/<(\/?)s>/gi,'<$1strike>'],/<script[^>]+>[\s\S]*?<\/script>/gi,[/ /g,'\u00a0']]);if(!ed.getParam('paste_retain_style_properties')){process([/<\/?(span)[^>]*>/gi]);}} 15 stripClass=ed.getParam('paste_strip_class_attributes');if(stripClass!='none'){function cleanClasses(str,cls){var i,out='';if(stripClass=='all') 16 return'';cls=tinymce.explode(cls,' ');for(i=cls.length-1;i>=0;i--){if(!/^(Mso)/i.test(cls[i])) 17 out+=(!out?'':' ')+cls[i];} 18 return' class="'+out+'"';};process([[/ class=\"([^\"]*)\"/gi,cleanClasses],[/ class=(\w+)/gi,cleanClasses]]);} 19 if(ed.getParam('paste_remove_spans')){process([/<\/?(span)[^>]*>/gi]);} 20 o.content=h;},_postProcess:function(pl,o){var t=this,ed=t.editor,dom=ed.dom,styleProps;if(o.wordContent){each(dom.select('a',o.node),function(a){if(!a.href||a.href.indexOf('#_Toc')!=-1) 21 dom.remove(a,1);});if(t.editor.getParam('paste_convert_middot_lists',true)) 22 t._convertLists(pl,o);styleProps=ed.getParam('paste_retain_style_properties');if(tinymce.is(styleProps,'string')) 23 styleProps=tinymce.explode(styleProps);each(dom.select('*',o.node),function(el){var newStyle={},npc=0,i,sp,sv;if(styleProps){for(i=0;i<styleProps.length;i++){sp=styleProps[i];sv=dom.getStyle(el,sp);if(sv){newStyle[sp]=sv;npc++;}}} 24 dom.setAttrib(el,'style','');if(styleProps&&npc>0) 25 dom.setStyles(el,newStyle);else 26 if(el.nodeName=='SPAN'&&!el.className) 27 dom.remove(el,true);});} 28 if(ed.getParam("paste_remove_styles")||(ed.getParam("paste_remove_styles_if_webkit")&&tinymce.isWebKit)){each(dom.select('*[style]',o.node),function(el){el.removeAttribute('style');el.removeAttribute('mce_style');});}else{if(tinymce.isWebKit){each(dom.select('*',o.node),function(el){el.removeAttribute('mce_style');});}}},_convertLists:function(pl,o){var dom=pl.editor.dom,listElm,li,lastMargin=-1,margin,levels=[],lastType,html;each(dom.select('p',o.node),function(p){var sib,val='',type,html,idx,parents;for(sib=p.firstChild;sib&&sib.nodeType==3;sib=sib.nextSibling) 29 val+=sib.nodeValue;val=p.innerHTML.replace(/<\/?\w+[^>]*>/gi,'').replace(/ /g,'\u00a0');if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val)) 30 type='ul';if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(val)) 31 type='ol';if(type){margin=parseFloat(p.style.marginLeft||0);if(margin>lastMargin) 32 levels.push(margin);if(!listElm||type!=lastType){listElm=dom.create(type);dom.insertAfter(listElm,p);}else{if(margin>lastMargin){listElm=li.appendChild(dom.create(type));}else if(margin<lastMargin){idx=tinymce.inArray(levels,margin);parents=dom.getParents(listElm.parentNode,type);listElm=parents[parents.length-1-idx]||listElm;}} 33 each(dom.select('span',p),function(span){var html=span.innerHTML.replace(/<\/?\w+[^>]*>/gi,'');if(type=='ul'&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(html)) 34 dom.remove(span);else if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) 35 dom.remove(span);});html=p.innerHTML;if(type=='ul') 36 html=p.innerHTML.replace(/__MCE_ITEM__/g,'').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,'');else 37 html=p.innerHTML.replace(/__MCE_ITEM__/g,'').replace(/^\s*\w+\.( |\u00a0)+\s*/,'');li=listElm.appendChild(dom.create('li',0,html));dom.remove(p);lastMargin=margin;lastType=type;}else 38 listElm=lastMargin=0;});html=o.node.innerHTML;if(html.indexOf('__MCE_ITEM__')!=-1) 39 o.node.innerHTML=html.replace(/__MCE_ITEM__/g,'');},_insertBlockContent:function(ed,dom,content){var parentBlock,marker,sel=ed.selection,last,elm,vp,y,elmHeight;function select(n){var r;if(tinymce.isIE){r=ed.getDoc().body.createTextRange();r.moveToElementText(n);r.collapse(false);r.select();}else{sel.select(n,1);sel.collapse(false);}};this._insert('<span id="_marker"> </span>',1);marker=dom.get('_marker');parentBlock=dom.getParent(marker,'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td');if(parentBlock&&!/TD|TH/.test(parentBlock.nodeName)){marker=dom.split(parentBlock,marker);each(dom.create('div',0,content).childNodes,function(n){last=marker.parentNode.insertBefore(n.cloneNode(true),marker);});select(last);}else{dom.setOuterHTML(marker,content);sel.select(ed.getBody(),1);sel.collapse(0);} 40 dom.remove('_marker');elm=sel.getStart();vp=dom.getViewPort(ed.getWin());y=ed.dom.getPos(elm).y;elmHeight=elm.clientHeight;if(y<vp.y||y+elmHeight>vp.y+vp.h) 41 ed.getDoc().body.scrollTop=y<vp.y?y:y-vp.h+25;},_insert:function(h,skip_undo){var ed=this.editor;if(!ed.selection.isCollapsed()) 42 ed.getDoc().execCommand('Delete',false,null);ed.execCommand(tinymce.isGecko?'insertHTML':'mceInsertContent',false,h,{skip_undo:skip_undo});},_legacySupport:function(){var t=this,ed=t.editor;each(['mcePasteText','mcePasteWord'],function(cmd){ed.addCommand(cmd,function(){ed.windowManager.open({file:t.url+(cmd=='mcePasteText'?'/pastetext.htm':'/pasteword.htm'),width:parseInt(ed.getParam("paste_dialog_width","450")),height:parseInt(ed.getParam("paste_dialog_height","400")),inline:1});});});ed.addButton('pastetext',{title:'paste.paste_text_desc',cmd:'mcePasteText'});ed.addButton('pasteword',{title:'paste.paste_word_desc',cmd:'mcePasteWord'});ed.addButton('selectall',{title:'paste.selectall_desc',cmd:'selectall'});}});tinymce.PluginManager.add('paste',tinymce.plugins.PastePlugin);})(); -
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/js
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/langs
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm
- Property eol-style:native set to data
-
branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm
- Property eol-style:native set to data
Note: See TracChangeset
for help on using the changeset viewer.
