X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-ui-debug.js;h=e6059e96f4b68daade7143b76e62a10fcde66ae9;hp=27bb0524dee0c4d3c256b93486e52e0a7762dce0;hb=ac5c1fd28fd7c9ecf15791a9cfee4b57186debe4;hpb=6387d7ef9465bff1ef6353e264016e71df096e83 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 27bb0524de..e6059e96f4 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -21180,6 +21180,21 @@ Roo.htmleditor.Filter.prototype = { }, this); + }, + + + removeNodeKeepChildren : function( node) + { + + ar = Array.from(node.childNodes); + for (var i = 0; i < ar.length; i++) { + + node.removeChild(ar[i]); + // what if we need to walk these??? + node.parentNode.insertBefore(ar[i], node); + + } + node.parentNode.removeChild(node); } }; @@ -21589,6 +21604,7 @@ Roo.htmleditor.FilterWord = function(cfg) // no need to apply config. this.replaceDocBullets(cfg.node); + this.replaceAname(cfg.node); // this is disabled as the removal is done by other filters; // this.walk(cfg.node); @@ -21714,7 +21730,31 @@ Roo.extend(Roo.htmleditor.FilterWord, Roo.htmleditor.Filter, }); return ret; }, - + + + replaceAname : function (doc) + { + // replace all the a/name without.. + var aa = Array.from(doc.getElementsByTagName('a')); + for (var i = 0; i < aa.length; i++) { + var a = aa[i]; + if (a.hasAttribute("name")) { + a.removeAttribute("name"); + } + if (a.hasAttribute("href")) { + continue; + } + // reparent children. + this.removeNodeKeepChildren(a); + + } + + + + }, + + + replaceDocBullets : function(doc) { // this is a bit odd - but it appears some indents use ql-indent-1