Changeset 587
- Timestamp:
- 2007-07-28 12:48:15 (16 months ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 5 modified
-
editor/fckeditor.html (modified) (1 diff)
-
editor/_source/internals/fck_gecko.js (modified) (1 diff)
-
editor/_source/internals/fck_ie.js (modified) (2 diffs)
-
editor/_source/internals/fck.js (modified) (2 diffs)
-
_whatsnew.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/fckeditor.html
r498 r587 204 204 // Set the editor interface direction. 205 205 window.document.dir = FCKLang.Dir ; 206 207 // Activate pasting operations.208 if ( FCKConfig.ForcePasteAsPlainText || FCKConfig.AutoDetectPasteFromWord )209 FCK.Events.AttachEvent( 'OnPaste', FCK.Paste ) ;210 206 211 207 </script> -
FCKeditor/trunk/editor/_source/internals/fck_gecko.js
r502 r587 150 150 } 151 151 152 FCK. Paste = function()152 FCK._ExecPaste = function() 153 153 { 154 154 // Save a snapshot for undo before actually paste the text -
FCKeditor/trunk/editor/_source/internals/fck_ie.js
r502 r587 85 85 function Doc_OnPaste() 86 86 { 87 return ( FCK.Status == FCK_STATUS_COMPLETE && FCK.Events.FireEvent( "OnPaste" ) ) ; 87 var body = FCK.EditorDocument.body ; 88 89 body.detachEvent( 'onpaste', Doc_OnPaste ) ; 90 91 var ret = FCK.Paste( !FCKConfig.ForcePasteAsPlainText && !FCKConfig.AutoDetectPasteFromWord ) ; 92 93 body.attachEvent( 'onpaste', Doc_OnPaste ) ; 94 95 return ret ; 88 96 } 89 97 … … 194 202 } 195 203 196 FCK. Paste = function()204 FCK._ExecPaste = function() 197 205 { 198 206 // As we call ExecuteNamedCommand('Paste'), it would enter in a loop. So, let's use a semaphore. -
FCKeditor/trunk/editor/_source/internals/fck.js
r563 r587 491 491 return sValue ? sValue : '' ; 492 492 }, 493 494 Paste : function( _callListenersOnly ) 495 { 496 // First call 'OnPaste' listeners. 497 if ( FCK.Status != FCK_STATUS_COMPLETE || !FCK.Events.FireEvent( 'OnPaste' ) ) 498 return false ; 499 500 // Then call the default implementation. 501 return _callListenersOnly || FCK._ExecPaste() ; 502 }, 493 503 494 504 PasteFromWord : function() … … 814 824 { 815 825 case 'Paste' : 816 return !FCK. Events.FireEvent( 'OnPaste') ;826 return !FCK.Paste() ; 817 827 818 828 case 'Cut' : -
FCKeditor/trunk/_whatsnew.html
r530 r587 138 138 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/977">#977</a>] The "shape" attribute of <area> had its 139 139 value changed to uppercase in IE.</li> 140 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/996">#996</a>] "OnPaste" 141 event listeners will now get executed only once.</li> 140 142 </ul> 141 143 <h3>