Ticket #2944: 2944.patch

File 2944.patch, 1.5 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/core/event.js

     
    121121                                        if ( isNaN( priority ) )
    122122                                                priority = 10;
    123123
     124                                        var me = this;
     125
    124126                                        // Create the function to be fired for this listener.
    125127                                        var listenerFirer = function( editor, publisherData, stopFn, cancelFn )
    126128                                        {
     
    132134                                                        data : publisherData,
    133135                                                        listenerData : listenerData,
    134136                                                        stop : stopFn,
    135                                                         cancel : cancelFn
     137                                                        cancel : cancelFn,
     138                                                        removeListener : function()
     139                                                        {
     140                                                                me.removeListener( eventName, listenerFunction );
     141                                                        }
    136142                                                };
    137143
    138144                                                listenerFunction.call( scopeObj, ev );
  • _source/plugins/editingblock/plugin.js

     
    9090                                        if ( editor.mode )
    9191                                                getMode( editor ).loadSnapshotData( event.data );
    9292                                });
     93
     94                        // For the first "mode" call, we'll also fire the "instanceReady"
     95                        // event.
     96                        editor.on( 'mode', function( event )
     97                                {
     98                                        // Do that once only.
     99                                        event.removeListener();
     100
     101                                        // Fire instanceReady for both the editor and CKEDITOR.
     102                                        editor.fireOnce( 'instanceReady' );
     103                                        CKEDITOR.fire( 'instanceReady', null, editor );
     104                                });
    93105                }
    94106        });
    95107
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy