Changeset 172
- Timestamp:
- 2007-03-01 15:43:26 (3 years ago)
- Location:
- FCKeditor/trunk/editor/_source
- Files:
-
- 2 modified
-
classes/fckeditingarea.js (modified) (1 diff)
-
commandclasses/fck_othercommands.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/classes/fckeditingarea.js
r152 r172 251 251 } 252 252 } 253 254 // Select the contents of the editing area255 FCKEditingArea.prototype.SelectAll = function()256 {257 if ( this.Mode == FCK_EDITMODE_WYSIWYG )258 {259 FCK.ExecuteNamedCommand( 'SelectAll' ) ;260 }261 else262 {263 // Select the contents of the textarea264 var textarea = this.Textarea ;265 if ( FCKBrowserInfo.IsIE )266 {267 var range = textarea.createTextRange() ;268 range.collapse( true ) ;269 range.moveEnd( 'character', textarea.value.length ) ;270 range.moveStart( 'character', 0 ) ;271 range.select() ;272 }273 else274 {275 textarea.selectionStart = 0;276 textarea.selectionEnd = textarea.value.length ;277 }278 textarea.focus() ;279 }280 281 } -
FCKeditor/trunk/editor/_source/commandclasses/fck_othercommands.js
r152 r172 333 333 FCKSelectAllCommand.prototype.Execute = function() 334 334 { 335 FCK.EditingArea.SelectAll() ; 335 if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) 336 { 337 FCK.ExecuteNamedCommand( 'SelectAll' ) ; 338 } 339 else 340 { 341 // Select the contents of the textarea 342 var textarea = FCK.EditingArea.Textarea ; 343 if ( FCKBrowserInfo.IsIE ) 344 { 345 textarea.createTextRange().execCommand( 'SelectAll' ) ; 346 } 347 else 348 { 349 textarea.selectionStart = 0; 350 textarea.selectionEnd = textarea.value.length ; 351 } 352 textarea.focus() ; 353 } 336 354 } 337 355