X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-bootstrap-debug.js;fp=roojs-bootstrap-debug.js;h=98a354fcf515ce2a0ec9d19687b2e7baf0277c22;hp=58357f4c266577694f5622e20cf6ae816b96a414;hb=792f4512f3c3ea5ad56ef9f532acf298e49f5411;hpb=6942f12be128bd0efe5727aae3a554f94a20ecd0 diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 58357f4c26..98a354fcf5 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -26630,6 +26630,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); @@ -26663,11 +26665,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;