examples/test.js
authorleon <leon@roojs.com>
Mon, 26 Feb 2024 07:08:56 +0000 (15:08 +0800)
committerleon <leon@roojs.com>
Mon, 26 Feb 2024 07:08:56 +0000 (15:08 +0800)
examples/test.js

index a045626..722f6ea 100644 (file)
@@ -1,5 +1,31 @@
 Roo.onReady(function() {
     new Roo.htmleditor.FilterStyleToTag({ node : document.body});
-    new Roo.htmleditor.FilterBlack({ node : document.body, tags : ['STYLE']})
+    new Roo.htmleditor.FilterAttributes({
+        node : document.body,
+        attrib_white : [
+            'href',
+            'src',
+            'name',
+            'align',
+            'colspan',
+            'rowspan' 
+        /*  THESE ARE NOT ALLWOED FOR PASTE
+         *    'data-display',
+            'data-caption-display',
+            'data-width',
+            'data-caption',
+            'start' ,
+            'style',
+            // youtube embed.
+            'class',
+            'allowfullscreen',
+            'frameborder',
+            'width',
+            'height',
+            'alt'
+            */
+            ],
+        attrib_clean : ['href', 'src' ] 
+    });
     // new Roo.htmleditor.FilterSpan({ node : document.body });
 });
\ No newline at end of file