Roo/form/ComboBoxArray.js
[roojs1] / Roo / form / HtmlEditor.js
index 11bb273..1371905 100644 (file)
@@ -200,11 +200,16 @@ Roo.form.HtmlEditor = Roo.extend(Roo.form.Field, {
             
         }
         
+        st +=  '<style type="text/css">' +
+            'IMG { cursor: pointer } ' +
+        '</style>';
+
+        
         return '<html><head>' + st  +
             //<style type="text/css">' +
             //'body{border:0;margin:0;padding:3px;height:98%;cursor:text;}' +
             //'</style>' +
-            ' </head><body></body></html>';
+            ' </head><body class="roo-htmleditor-body"></body></html>';
     },
 
     // private
@@ -662,43 +667,8 @@ Roo.form.HtmlEditor = Roo.extend(Roo.form.Field, {
         this.doc.execCommand(cmd, false, value === undefined ? null : value);
         this.syncValue();
     },
-
-    // private
-    applyCommand : function(e)
-    {
-        if(!e.ctrlKey){
-            return;
-        }
-        // decide what to do with ctrl characters.
-        
-        var c = e.getCharCode(), cmd;
-        if(c > 0){
-            c = String.fromCharCode(c);
-            switch(c){
-                case 'b':
-                    cmd = 'bold';
-                break;
-                case 'i':
-                    cmd = 'italic';
-                break;
-                case 'u':
-                    cmd = 'underline';
-                break;
-            }
-            if(cmd){
-                this.win.focus();
-                this.execCmd(cmd);
-                this.deferFocus();
-                e.preventDefault();
-            }
-        }
-        
-    },
-
-
-
-
-
    
     /**
      * Inserts the passed text at the current cursor position. Note: the editor must be initialized and activated
@@ -764,17 +734,19 @@ Roo.form.HtmlEditor = Roo.extend(Roo.form.Field, {
                 switch(c){
                     case 'b':
                         cmd = 'bold';
-                    break;
+                        break;
                     case 'i':
                         cmd = 'italic';
-                    break;
+                        break;
+                    
                     case 'u':
                         cmd = 'underline';
                         break;
+                    
                     case 'v':
                         this.cleanUpPaste.defer(100, this);
                         return;
-                    break;
+                        
                 }
                 if(cmd){
                     this.win.focus();