roojs-ui.js
[roojs1] / roojs-ui-debug.js
index 27c7d22..4f1716c 100644 (file)
@@ -26736,6 +26736,10 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
         ["abbr"],[ "acronym"],[ "address"],[ "cite"],[ "samp"],[ "var"],
         ['div'],['span']
     ],
+    
+    cleanStyles : [
+        "font-size"
+    ],
      /**
      * @cfg {String} defaultFont default font to use.
      */
@@ -26962,6 +26966,33 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
             
             
         }
+        
+        var cmenu = { };
+        if (!this.disable.cleanStyles) {
+            cmenu = {
+                cls: 'x-btn-icon x-btn-clear',
+                
+                menu : {
+                    items : []
+                }
+            };
+            for (var i =0; i < this.cleanStyles.length; i++) {
+                cmenu.menu.items.push({
+                    
+                    html: this.cleanStyles[i],
+                    handler: function(a,b) {
+                        var c = Roo.get(editor.doc.body);
+                        c.select('[style]').each(function(s) {
+                            s.dom.style.removeProperty(a.html);
+                        });
+                        
+                    },
+                    tabIndex:-1
+                });
+            }
+            
+            tb.add(cmenu);
+        }
          
         if (!this.disable.specialElements) {
             var semenu = {
@@ -40690,9 +40721,9 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
         if (!el && typeof(this.parent) == 'string' && this.parent.substring(0,1) == '#') {
             // if parent is a '#.....' string, then let's use that..
             var ename = this.parent.substr(1)
-            this.parent = false;
+            this.parent = (this.parent == '#bootstrap') ? { el : true}  : false; // flags it as a top module...
             el = Roo.get(ename);
-            if (!el) {
+            if (!el && !this.parent) {
                 Roo.log("Warning - element can not be found :#" + ename );
                 return;
             }