X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-bootstrap-debug.js;fp=roojs-bootstrap-debug.js;h=32e427180d91881863f80f3244ba6de108ff5eff;hp=3919fe16fc05f961bc33f12c31c91f2c340497a9;hb=10db261e7d6b23c055f07797e9afef70ffed408a;hpb=a26a1ebe59567f87f8e12170f62b428a91862f0c diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 3919fe16fc..32e427180d 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -26585,7 +26585,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; }, @@ -26612,7 +26612,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; @@ -26623,15 +26625,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'); @@ -26663,18 +26666,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;