X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-debug.js;fp=roojs-debug.js;h=c8a7c4e056d1407ad1cdaa9ddef68eba4c19e96c;hp=b72198f2df467e4717aa0c3d0c4cdfafb19331d2;hb=6942f12be128bd0efe5727aae3a554f94a20ecd0;hpb=bb4f20285cb0ce281099e1db5cb76e60175de50f diff --git a/roojs-debug.js b/roojs-debug.js index b72198f2df..c8a7c4e056 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -46244,6 +46244,8 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, var lvl = 0; var stack = [ ul ]; var last_li = false; + var base_lvl = 0; + items.forEach(function(n) { //Roo.log("got innertHMLT=" + n.innerHTML); @@ -46277,11 +46279,20 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, } var nlvl = (style['mso-list'].split(' ')[1].replace(/level/,'') *1) - 1; - if (nlvl > lvl && last_li) { + + + + if (nlvl > lvl) { //new indent - var nul = doc.createElement('ul'); // what about number lists... - last_li.appendChild(nul); - stack[nlvl] = nul; + if (last_li) { + var nul = doc.createElement('ul'); // what about number lists... + last_li.appendChild(nul); + stack[nlvl] = nul; + } else { + // occurs when we get a level (1) but no parent - just put all the children on the top most.. + stack[nlvl] = stack[stack.length-1]; + } + } lvl = nlvl;