From e4d308ee7c0cef4860cc430139e9ee3984fb51eb Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 21 Jun 2022 11:44:24 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js roojs-bootstrap.js roojs-bootstrap-debug.js roojs-all.js roojs-debug.js --- roojs-all.js | 2 +- roojs-debug.js | 3 ++- roojs-ui-debug.js | 3 ++- roojs-ui.js | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index 45f8aef2b0..34c523e8e5 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1931,7 +1931,7 @@ 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){Roo.log(A.innerHTML);var B=A.getElementsByClassName('MsoListParagraphCxSpFirst');for(var i=0;iD){var K=B.createElement('ul'); diff --git a/roojs-debug.js b/roojs-debug.js index e5c3b7fed0..7d72579546 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -46218,12 +46218,13 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, listpara.item(i).className = "MsoListParagraph"; } // this is a bit hacky - we had one word document where h2 had a miso-list attribute. - var htwo = doc.getElementByTagName('h2'); + var htwo = doc.getElementsByTagName('h2'); for( var i = 0; i < htwo.length; i ++) { if (htwo.item(i).getAttribute('style').match(/mso-list:/)) { htwo.item(i).className = "MsoListParagraph"; } } + listpara = doc.getElementsByClassName('ql-indent-1'); while(listpara.length) { this.replaceDocBullet(listpara.item(0)); diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 012b11b971..ce02fe3316 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -21726,12 +21726,13 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, listpara.item(i).className = "MsoListParagraph"; } // this is a bit hacky - we had one word document where h2 had a miso-list attribute. - var htwo = doc.getElementByTagName('h2'); + var htwo = doc.getElementsByTagName('h2'); for( var i = 0; i < htwo.length; i ++) { if (htwo.item(i).getAttribute('style').match(/mso-list:/)) { htwo.item(i).className = "MsoListParagraph"; } } + listpara = doc.getElementsByClassName('ql-indent-1'); while(listpara.length) { this.replaceDocBullet(listpara.item(0)); diff --git a/roojs-ui.js b/roojs-ui.js index 7609c34cfe..0dd150a7a9 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -985,7 +985,7 @@ 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){Roo.log(A.innerHTML);var B=A.getElementsByClassName('MsoListParagraphCxSpFirst');for(var i=0;iD){var K=B.createElement('ul'); -- 2.39.2