Roo/htmleditor/FilterHashLink.js
authorleon <leon@roojs.com>
Mon, 20 Nov 2023 05:12:07 +0000 (13:12 +0800)
committerleon <leon@roojs.com>
Mon, 20 Nov 2023 05:12:07 +0000 (13:12 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/htmleditor/FilterHashLink.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 94a1ef7..2335ed1 100644 (file)
@@ -25,6 +25,8 @@
              var a = node.attributes[i];
 
              if(a.name.toLowerCase() == 'href' && a.value.startsWith('#')) {
+                 Roo.log('REPLACE HASH LINK');
+                 Roo.log(node);
                  var ar = Array.from(node.childNodes);
                  for (var i = 0; i < ar.length; i++) {
                      node.parentNode.insertBefore(ar[i], node);
index e5b8c89..0bcc2d4 100644 (file)
@@ -27453,6 +27453,8 @@ Roo.extend(Roo.htmleditor.FilterParagraph, Roo.htmleditor.Filter,
              var a = node.attributes[i];
 
              if(a.name.toLowerCase() == 'href' && a.value.startsWith('#')) {
+                 Roo.log('REPLACE HASH LINK');
+                 Roo.log(node);
                  var ar = Array.from(node.childNodes);
                  for (var i = 0; i < ar.length; i++) {
                      node.parentNode.insertBefore(ar[i], node);
index f9ac69b..bebd627 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('#')){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.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('REPLACE HASH LINK');
+Roo.log(A);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;}});