Ticket #6161: 6161_2.2.patch

File 6161_2.2.patch, 1.0 KB (added by exim, 13 years ago)

Added config.autoGrow_onStartup (default: false) to maintain previous AutoGrow behavior

  • _source/plugins/autogrow/plugin.js

     
    4141        {
    4242                init : function( editor )
    4343                {
    44                         for ( var eventName in { contentDom:1, key:1, selectionChange:1, insertElement:1 } )
     44                        var eventsList = { contentDom:1, key:1, selectionChange:1, insertElement:1 };
     45                        if (editor.config.autoGrow_onStartup)
     46                                eventsList[ 'instanceReady' ] = 1;
     47                        for ( var eventName in eventsList )
    4548                        {
    4649                                editor.on( eventName, function( evt )
    4750                                {
     
    7780 * @example
    7881 * config.autoGrow_maxHeight = 400;
    7982 */
     83 
     84 /**
     85 * Whether to have AutoGrow change the size immediately after the editor becomes ready.
     86 * @name CKEDITOR.config.autoGrow_onStartup
     87 * @type Boolean
     88 * @default false
     89 * @since 3.6.2
     90 * @example
     91 * config.autoGrow_onStartup = true;
     92 */
     93
    8094
    8195/**
    8296 * Fired when the AutoGrow plugin is about to change the size of the editor.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy