}
+ 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
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
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();