X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-ui-debug.js;h=6623fbfdb0bd2eb6b93fb28ef8cb34cd53f616ce;hp=04f94434e80d6f01b3168507eb0897bb917318ec;hb=8f5eb4c4c8c1b9d0a7198e29efe26ac2d9e0bff8;hpb=e0595f1ef291ec3cb61f8a9a54935a4fd18555ad diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 04f94434e8..6623fbfdb0 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -21719,16 +21719,29 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, 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) @@ -21798,6 +21811,10 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, 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;