Ticket #2017: 2017.patch

File 2017.patch, 2.6 KB (added by Frederico Caldeira Knabben, 16 years ago)
  • _test/manual/fckeditorapi/test1.html

     
    4646                var iCount = 0 ;
    4747                var sInstances = '' ;
    4848
    49                 for ( var s in FCKeditorAPI.__Instances )
     49                for ( var s in FCKeditorAPI.Instances )
    5050                {
    5151                        iCount++ ;
    5252
  • _whatsnew.html

     
    3737        <p>
    3838                New Features and Improvements:</p>
    3939        <ul>
    40                 <li></li>
     40                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2017">#2017</a>] The FCKeditorAPI.Instances
     41                        object can now be used to access all FCKeditor instances available in the page.</li>
    4142        </ul>
    4243        <p>
    4344                Fixed Bugs:</p>
  • editor/_source/fckeditorapi.js

     
    4242                        'window.FCKeditorAPI = {' +
    4343                                'Version : "[Development]",' +
    4444                                'VersionBuild : "[DEV]",' +
    45                                 '__Instances : new Object(),' +
     45                                'Instances : new Object(),' +
    4646
    4747                                'GetInstance : function( name )' +
    4848                                '{' +
    49                                         'return this.__Instances[ name ];' +
     49                                        'return this.Instances[ name ];' +
    5050                                '},' +
    5151
    5252                                '_FormSubmit : function()' +
    5353                                '{' +
    54                                         'for ( var name in FCKeditorAPI.__Instances )' +
     54                                        'for ( var name in FCKeditorAPI.Instances )' +
    5555                                        '{' +
    56                                                 'var oEditor = FCKeditorAPI.__Instances[ name ] ;' +
     56                                                'var oEditor = FCKeditorAPI.Instances[ name ] ;' +
    5757                                                'if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )' +
    5858                                                        'oEditor.UpdateLinkedField() ;' +
    5959                                        '}' +
     
    129129                }
    130130
    131131                FCKeditorAPI = oParentWindow.FCKeditorAPI ;
     132               
     133                // The __Instances properly has been changed to the public Instances,
     134                // but we should still have the "deprecated" version of it.
     135                FCKeditorAPI.__Instances = FCKeditorAPI.Instances ;
    132136        }
    133137
    134138        // Add the current instance to the FCKeditorAPI's instances collection.
    135         FCKeditorAPI.__Instances[ FCK.Name ] = FCK ;
     139        FCKeditorAPI.Instances[ FCK.Name ] = FCK ;
    136140}
    137141
    138142// Attach to the form onsubmit event and to the form.submit().
     
    162166{
    163167        if ( ! window.FCKUnloadFlag )
    164168                return ;
    165         delete FCKeditorAPI.__Instances[ FCK.Name ] ;
     169        delete FCKeditorAPI.Instances[ FCK.Name ] ;
    166170}
    167171function FCKeditorAPI_ConfirmCleanup()
    168172{
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy