Changeset 13273
- Timestamp:
- 04/05/08 12:07:33 (8 months ago)
- Location:
- dijit/trunk
- Files:
-
- 4 modified
-
Editor.js (modified) (2 diffs)
-
_editor/nls/commands.js (modified) (1 diff)
-
_editor/plugins/EnterKeyHandling.js (modified) (1 diff)
-
_editor/RichText.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/Editor.js
r12777 r13273 146 146 return this[cmd](); 147 147 }else{ 148 if(this.customUndo){ 149 this.endEditing(); 150 this._beginEditing(); 151 } 148 152 try{ 149 if(this.customUndo){150 this.endEditing();151 this._beginEditing();152 }153 153 var r = this.inherited('execCommand',arguments); 154 if(this.customUndo){ 155 this._endEditing();156 } 157 return r; 154 if(dojo.isSafari && cmd=='paste' && !r){ //see #4598: safari does not support invoking paste from js 155 var su = dojo.string.substitute, _isM = navigator.userAgent.indexOf("Macintosh") != -1; 156 alert(su(this.commands.pasteShortcutSafari,[su(this.commands[_isM ? 'appleKey' : 'ctrlKey'], ['V'])])); 157 } 158 158 }catch(e){ 159 159 if(dojo.isMoz && /copy|cut|paste/.test(cmd)){ … … 165 165 [this.commands[cmd], sub(this.commands[isMac ? 'appleKey' : 'ctrlKey'], [accel[cmd]])])); 166 166 } 167 return false; 168 } 167 r = false; 168 } 169 if(this.customUndo){ 170 this._endEditing(); 171 } 172 return r; 169 173 } 170 174 }, -
dijit/trunk/_editor/nls/commands.js
r11886 r13273 41 41 'systemShortcutFF': 'The "${0}" action is only available in Mozilla Firefox using a keyboard shortcut. Use ${1}.', 42 42 'ctrlKey':'ctrl+${0}', 43 'appleKey':'\u2318${0}' // "command" or open-apple key on Macintosh 43 'appleKey':'\u2318${0}', // "command" or open-apple key on Macintosh 44 'pasteShortcutSafari':'The "paste" action is only available in Safari using a keyboard shortcut. Use ${0}.' 44 45 }) -
dijit/trunk/_editor/plugins/EnterKeyHandling.js
r13263 r13273 146 146 147 147 //text node directly under body, let's wrap them in a node 148 if(!block.blockNode ){149 this.editor.document.execCommand('formatblock', false,this.blockNodeForEnter);148 if(!block.blockNode || block.blockNode===this.editor.editNode){ 149 dijit._editor.RichText.prototype.execCommand.call(this.editor, 'formatblock',this.blockNodeForEnter); 150 150 //get the newly created block node 151 151 // FIXME -
dijit/trunk/_editor/RichText.js
r13262 r13273 450 450 if(!this.iframe){ 451 451 var ifr = this.iframe = dojo.doc.createElement("iframe"); 452 ifr.id=this.id ;452 ifr.id=this.id+"_iframe"; 453 453 // this.iframe.src = "about:blank"; 454 454 // dojo.doc.body.appendChild(this.iframe);