src/pyams_skin/resources/js/ext/tinymce/dev/classes/ForceBlocks.min.js
changeset 566 a1707c607eec
parent 565 318533413200
child 567 bca1726b1d85
--- a/src/pyams_skin/resources/js/ext/tinymce/dev/classes/ForceBlocks.min.js	Sun Jul 19 02:02:20 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-define("tinymce/ForceBlocks",[],function(){return function(c){var b=c.settings,f=c.dom,a=c.selection;var e=c.schema,d=e.getBlockElements();function g(){var m=a.getStart(),k=c.getBody(),h;var n,s,w,u,l;var o,p=-16777215,t,i;var v,j,r;r=b.forced_root_block;if(!m||m.nodeType!==1||!r){return}while(m&&m!=k){if(d[m.nodeName]){return}m=m.parentNode}h=a.getRng();if(h.setStart){n=h.startContainer;s=h.startOffset;w=h.endContainer;u=h.endOffset;try{i=c.getDoc().activeElement===k}catch(q){}}else{if(h.item){m=h.item(0);h=c.getDoc().body.createTextRange();h.moveToElementText(m)}i=h.parentElement().ownerDocument===c.getDoc();v=h.duplicate();v.collapse(true);s=v.move("character",p)*-1;if(!v.collapsed){v=h.duplicate();v.collapse(false);u=(v.move("character",p)*-1)-s}}m=k.firstChild;j=k.nodeName.toLowerCase();while(m){if(((m.nodeType===3||(m.nodeType==1&&!d[m.nodeName])))&&e.isValidChild(j,r.toLowerCase())){if(m.nodeType===3&&m.nodeValue.length===0){o=m;m=m.nextSibling;f.remove(o);continue}if(!l){l=f.create(r,c.settings.forced_root_block_attrs);m.parentNode.insertBefore(l,m);t=true}o=m;m=m.nextSibling;l.appendChild(o)}else{l=null;m=m.nextSibling}}if(t&&i){if(h.setStart){h.setStart(n,s);h.setEnd(w,u);a.setRng(h)}else{try{h=c.getDoc().body.createTextRange();h.moveToElementText(k);h.collapse(true);h.moveStart("character",s);if(u>0){h.moveEnd("character",u)}h.select()}catch(q){}}c.nodeChanged()}}if(b.forced_root_block){c.on("NodeChange",g)}}});
\ No newline at end of file