From e0595f1ef291ec3cb61f8a9a54935a4fd18555ad Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 21 Jun 2022 11:45:24 +0800 Subject: [PATCH] Changed docs/src/Roo_htmleditor_FilterWord.js.html --- docs/src/Roo_htmleditor_FilterWord.js.html | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/src/Roo_htmleditor_FilterWord.js.html b/docs/src/Roo_htmleditor_FilterWord.js.html index 72c79251e8..768787a305 100644 --- a/docs/src/Roo_htmleditor_FilterWord.js.html +++ b/docs/src/Roo_htmleditor_FilterWord.js.html @@ -144,16 +144,29 @@ replaceDocBullets : function(doc) { // this is a bit odd - but it appears some indents use ql-indent-1 + //Roo.log(doc.innerHTML); - var listpara = doc.getElementsByClassName('ql-indent-1'); + var listpara = doc.getElementsByClassName('MsoListParagraphCxSpFirst'); + for( var i = 0; i < listpara.length; i ++) { + 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.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)); } - - var listpara = doc.getElementsByClassName('MsoListParagraph'); + listpara = doc.getElementsByClassName('MsoListParagraph'); while(listpara.length) { this.replaceDocBullet(listpara.item(0)); } + }, replaceDocBullet : function(p) @@ -223,6 +236,10 @@ if (nlvl > lvl) { //new indent var nul = doc.createElement('ul'); // what about number lists... + if (!last_li) { + last_li = doc.createElement('li'); + stack[lvl].appendChild(last_li); + } last_li.appendChild(nul); stack[nlvl] = nul; -- 2.39.2