Roo/form/HtmlEditor/ToolbarStandard.js
authorEdward <edward@roojs.com>
Mon, 13 Jan 2014 05:37:13 +0000 (13:37 +0800)
committerEdward <edward@roojs.com>
Mon, 13 Jan 2014 05:37:13 +0000 (13:37 +0800)
Roo/form/HtmlEditor/ToolbarStandard.js

index 1c30c17..aa30d86 100644 (file)
@@ -122,7 +122,7 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
         ['div'],['span']
     ],
     
-    cleanStyle : [
+    cleanStyles : [
         "font-size"
     ],
      /**
@@ -352,6 +352,35 @@ Roo.apply(Roo.form.HtmlEditor.ToolbarStandard.prototype,  {
             
         }
         
+        var cmenu = { };
+        // special menu.. - needs to be tidied up..
+        if (!this.disable.cleanStyles) {
+            cmenu = {
+                text: "&#169;",
+                cls: 'x-btn-icon',
+                
+                menu : {
+                    items : []
+                }
+            };
+            for (var i =0; i < this.specialChars.length; i++) {
+                smenu.menu.items.push({
+                    
+                    html: this.specialChars[i],
+                    handler: function(a,b) {
+                        editor.insertAtCursor(String.fromCharCode(a.html.replace('&#','').replace(';', '')));
+                        //editor.insertAtCursor(a.html);
+                        
+                    },
+                    tabIndex:-1
+                });
+            }
+            
+            
+            tb.add(smenu);
+            
+            
+        }
          
         if (!this.disable.specialElements) {
             var semenu = {