X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-ui-debug.js;h=4f5f9ac2c859edfbad049dc67a6d7c9f60b029ec;hp=cb4aab90a604473c42b8606ba7827a54e98cfdc5;hb=6942f12be128bd0efe5727aae3a554f94a20ecd0;hpb=bb4f20285cb0ce281099e1db5cb76e60175de50f diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index cb4aab90a6..4f5f9ac2c8 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -21752,6 +21752,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); @@ -21785,11 +21787,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;