Changeset 152

Show
Ignore:
Timestamp:
2007-02-24 13:17:15 (3 years ago)
Author:
alfonsoml
Message:

Ticket #118: Make the SelectAll command available in source mode.

Location:
FCKeditor/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckeditingarea.js

    r132 r152  
    251251        } 
    252252} 
     253 
     254// Select the contents of the editing area 
     255FCKEditingArea.prototype.SelectAll = function() 
     256{ 
     257                if ( this.Mode == FCK_EDITMODE_WYSIWYG ) 
     258                { 
     259                        FCK.ExecuteNamedCommand( 'SelectAll' ) ; 
     260                } 
     261                else 
     262                { 
     263                        // Select the contents of the textarea 
     264                        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                        else 
     274                        { 
     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

    r132 r152  
    331331} 
    332332 
    333 FCKSelectAllCommand.prototype = new FCKNamedCommand( 'SelectAll' ) ; 
     333FCKSelectAllCommand.prototype.Execute = function() 
     334{ 
     335        FCK.EditingArea.SelectAll() ; 
     336} 
    334337 
    335338FCKSelectAllCommand.prototype.GetState = function() 
  • FCKeditor/trunk/editor/_source/internals/fcktoolbaritems.js

    r132 r152  
    5656                case 'Undo'                             : oItem = new FCKToolbarButton( 'Undo'          , FCKLang.Undo, null, null, false, true, 14 ) ; break ; 
    5757                case 'Redo'                             : oItem = new FCKToolbarButton( 'Redo'          , FCKLang.Redo, null, null, false, true, 15 ) ; break ; 
    58                 case 'SelectAll'                : oItem = new FCKToolbarButton( 'SelectAll'     , FCKLang.SelectAll, null, null, null, null, 18 ) ; break ; 
     58                case 'SelectAll'                : oItem = new FCKToolbarButton( 'SelectAll'     , FCKLang.SelectAll, null, null, true, null, 18 ) ; break ; 
    5959                case 'RemoveFormat'             : oItem = new FCKToolbarButton( 'RemoveFormat', FCKLang.RemoveFormat, null, null, false, true, 19 ) ; break ; 
    6060                case 'FitWindow'                : oItem = new FCKToolbarButton( 'FitWindow'     , FCKLang.FitWindow, null, null, true, true, 66 ) ; break ; 
  • FCKeditor/trunk/_whatsnew.html

    r151 r152  
    6262                <li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&aid=1573191&group_id=75348&atid=543653">SF 
    6363                        BUG-1573191</a>] The Html code inserted with FCK.InsertHtml didn't have the same protection for special tags.</li> 
     64                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/118">Ticket-118</a>]  
     65                        The SelectAll command now is available in Source Mode.</li> 
    6466        </ul> 
    6567        <h3>