X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-ui-debug.js;fp=roojs-ui-debug.js;h=a25511bd648320e29a13e7909af49f983dee7ff9;hp=4a9967c66210f0b7ef916f005d7a8325fa220040;hb=a26a1ebe59567f87f8e12170f62b428a91862f0c;hpb=51ed2845f5c09276c637c52a110fac3756b69493 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 4a9967c662..a25511bd64 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -21707,7 +21707,7 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, var kv = s.split(":"); // what ever is left... we allow. - ret[kv[0]] = kv[1]; + ret[kv[0].trim()] = kv[1]; }); return ret; }, @@ -21734,7 +21734,9 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, var ns = p, parent = p.parentNode, doc = parent.ownerDocument, - items = []; + items = []; + + while (ns) { if (ns.nodeType != 1) { ns = ns.nextSibling; @@ -21745,15 +21747,16 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, } items.push(ns); ns = ns.nextSibling; - } + + var ul = parent.ownerDocument.createElement('ul'); // what about number lists... parent.insertBefore(ul, p); var lvl = 0; var stack = [ ul ]; var last_li = false; - items.forEach(function(n) { + items.forEach(function(n, ipos) { //Roo.log("got innertHMLT=" + n.innerHTML); var spans = n.getElementsByTagName('span'); @@ -21785,18 +21788,15 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, return; } - var nlvl = Math.min( - stack.length-1, - (style['mso-list'].split(' ')[1].replace(/level/,'') *1) - 1 - ); + var nlvl = (style['mso-list'].split(' ')[1].replace(/level/,'') *1) - 1 ; if (nlvl > lvl) { //new indent - var nul = doc.createElement('ul'); // what about number lists... - last_li.appendChild(nul); - stack[nlvl] = nul; + var nul = doc.createElement('ul'); // what about number lists... + last_li.appendChild(nul); + stack[nlvl] = nul; } lvl = nlvl;