X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-bootstrap.js;h=379f958ac6e7f7b3020af28384bf4fe14f23c8d9;hp=692ae872a171a3045c8bf5a82987dd52e1cf200e;hb=6387d7ef9465bff1ef6353e264016e71df096e83;hpb=a79418f2d639838995134f03eb135328a1039665 diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 692ae872a1..379f958ac6 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1150,12 +1150,13 @@ A.removeChild(cn);A.parentNode.insertBefore(cn,A);if(cn.nodeType==1){this.replac }C.push(F);});A.className=C.length?C.join(' '):'';if(!C.length){A.removeAttribute("class");}}if(A.hasAttribute("lang")){A.removeAttribute("lang");}if(A.hasAttribute("style")){var D=A.getAttribute("style").split(";");var E=[];Roo.each(D,function(s){if(!s.match(/:/)){return; }var kv=s.split(":");if(kv[0].match(/^(mso-|line|font|background|margin|padding|color)/)){return;}E.push(s);});A.setAttribute("style",E.length?E.join(';'):'');if(!E.length){A.removeAttribute('style');}}return true;},styleToObject:function(A){var B=(A.getAttribute("style")||'').split(";"); var C={};Roo.each(B,function(s){if(!s.match(/:/)){return;}var kv=s.split(":");C[kv[0].trim()]=kv[1];});return C;},replaceDocBullets:function(A){var B=A.getElementsByClassName('MsoListParagraphCxSpFirst');for(var i=0;iF){var M=B.createElement('ul');if(!H){H=B.createElement('li');G[F].appendChild(H);}H.appendChild(M); -G[L]=M;}F=L;var N=G[L].appendChild(B.createElement('li'));H=N;N.innerHTML=n.innerHTML;A.removeChild(n);},this);}}); +}var C=A.getElementsByTagName('h2');for(var i=0;iF){var N=B.createElement('ul'); +if(!H){H=B.createElement('li');G[F].appendChild(H);}H.appendChild(N);G[nlvl]=N;}F=nlvl;var O=G[nlvl].appendChild(B.createElement('li'));H=O;O.innerHTML=n.innerHTML;A.removeChild(n);},this);}}); // Roo/htmleditor/FilterStyleToTag.js Roo.htmleditor.FilterStyleToTag=function(A){this.tags={B:['fontWeight','bold'],I:['fontStyle','italic'],SUP:['verticalAlign','super'],SUB:['verticalAlign','sub']};Roo.apply(this,A);this.walk(A.node);};Roo.extend(Roo.htmleditor.FilterStyleToTag,Roo.htmleditor.Filter,{tag:true,tags:false,replaceTag:function(A){if(A.getAttribute("style")===null){return true; }var B=[];for(var k in this.tags){if(A.style[this.tags[k][0]]==this.tags[k][1]){B.push(k);A.style.removeProperty(this.tags[k][0]);}}if(!B.length){return true;}var cn=Array.from(A.childNodes);var nn=A;Roo.each(B,function(t){var nc=A.ownerDocument.createElement(t);