Roo/form/HtmlEditor/ToolbarStandard.js
authorAlan Knowles <alan@roojs.com>
Fri, 25 Jul 2014 05:31:44 +0000 (13:31 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 25 Jul 2014 05:31:44 +0000 (13:31 +0800)
Roo/form/HtmlEditor/ToolbarStandard.js

index 7d08418..4f70fb5 100644 (file)
@@ -394,7 +394,19 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
                     tabIndex:-1
                 });
             }
-            
+            cmenu.menu.items.push({
+                actiontype : 'all',
+                html: 'Remove All Styles',
+                handler: function(a,b) {
+                    
+                    var c = Roo.get(editorcore.doc.body);
+                    c.select('[style]').each(function(s) {
+                        s.dom.removeAttribute('style');
+                    });
+                    
+                },
+                tabIndex:-1
+            });
             tb.add(cmenu);
         }