Roo/htmleditor/FilterEmpty.js
authorleon <leon@roojs.com>
Mon, 26 Feb 2024 09:05:12 +0000 (17:05 +0800)
committerleon <leon@roojs.com>
Mon, 26 Feb 2024 09:05:12 +0000 (17:05 +0800)
Roo/htmleditor/FilterEmpty.js

index df16067..411b99b 100644 (file)
@@ -22,12 +22,11 @@ Roo.extend(Roo.htmleditor.FilterEmpty, Roo.htmleditor.FilterBlack,
     {
         Roo.log(node.tagName);
         Roo.log(node.innerHTML);
-        this.walk(node);
-        if(!['B', 'I', 'U', 'S'].includes(node.tagName)) {
-            return false;
-        }
-
         if (node.innerHTML.trim() != '') {
+            this.walk(node);
+        }
+        Roo.log('CHECK');
+        if(!['B', 'I', 'U', 'S'].includes(node.tagName)) {
             return false;
         }
         if (node.attributes && node.attributes.length > 0) {