roojs-bootstrap.js
authorleon <leon@roojs.com>
Mon, 20 Nov 2023 05:11:25 +0000 (13:11 +0800)
committerleon <leon@roojs.com>
Mon, 20 Nov 2023 05:11:25 +0000 (13:11 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index faad3d2..e5b8c89 100644 (file)
@@ -27453,10 +27453,12 @@ Roo.extend(Roo.htmleditor.FilterParagraph, Roo.htmleditor.Filter,
              var a = node.attributes[i];
 
              if(a.name.toLowerCase() == 'href' && a.value.startsWith('#')) {
-                 Roo.log('REMOVE NODE KEEP CHILDREN');
-                 Roo.log(node);
-                //  this.removeNodeKeepChildren(node);
-                Roo.log('?');
+                 var ar = Array.from(node.childNodes);
+                 for (var i = 0; i < ar.length; i++) {
+                     node.parentNode.insertBefore(ar[i], node);
+                 }
+                 
+                 node.parentNode.removeChild(node);
              }
          }
          
index 4117644..f9ac69b 100644 (file)
@@ -1205,8 +1205,8 @@ Roo.htmleditor.FilterParagraph=function(A){this.walkTag(A.node);};Roo.extend(Roo
 return false;}var ar=Array.from(A.childNodes);for(var i=0;i<ar.length;i++){A.removeChild(ar[i]);A.parentNode.insertBefore(ar[i],A);}A.parentNode.insertBefore(A.ownerDocument.createElement('BR'),A);A.parentNode.insertBefore(A.ownerDocument.createElement('BR'),A);
 A.parentNode.removeChild(A);return false;}});
 // Roo/htmleditor/FilterHashLink.js
-Roo.htmleditor.FilterHashLink=function(A){this.walkTag(A.node);};Roo.extend(Roo.htmleditor.FilterHashLink,Roo.htmleditor.Filter,{tag:'A',replaceTag:function(A){for(var i=0;i<A.attributes.length;i++){var a=A.attributes[i];if(a.name.toLowerCase()=='href'&&a.value.startsWith('#')){Roo.log('REMOVE NODE KEEP CHILDREN');
-Roo.log(A);Roo.log('?');}}return false;}});
+Roo.htmleditor.FilterHashLink=function(A){this.walkTag(A.node);};Roo.extend(Roo.htmleditor.FilterHashLink,Roo.htmleditor.Filter,{tag:'A',replaceTag:function(A){for(var i=0;i<A.attributes.length;i++){var a=A.attributes[i];if(a.name.toLowerCase()=='href'&&a.value.startsWith('#')){var ar=Array.from(A.childNodes);
+for(var i=0;i<ar.length;i++){A.parentNode.insertBefore(ar[i],A);}A.parentNode.removeChild(A);}}return false;}});
 // Roo/htmleditor/FilterSpan.js
 Roo.htmleditor.FilterSpan=function(A){this.walkTag(A.node);};Roo.extend(Roo.htmleditor.FilterSpan,Roo.htmleditor.FilterKeepChildren,{tag:'SPAN',replaceTag:function(A){if(A.attributes&&A.attributes.length>0){return true;}Roo.htmleditor.FilterKeepChildren.prototype.replaceTag.call(this,A);
 return false;}});