Ticket #4507: 4507.patch

File 4507.patch, 909 bytes (added by Dekel, 14 years ago)

patch for #4507

  • _source/plugins/save/plugin.js

     
    1616                exec : function( editor )
    1717                {
    1818                        var $form = editor.element.$.form;
     19                        var config = editor.config;
     20                       
     21                        if (typeof config.saveFunction == 'function') {
     22                                config.saveFunction(editor.getData());
     23                                return;
     24                        }
    1925
    2026                        if ( $form )
    2127                        {
     
    4349                init : function( editor )
    4450                {
    4551                        var command = editor.addCommand( pluginName, saveCmd );
    46                         command.modes = { wysiwyg : !!( editor.element.$.form ) };
    47 
     52                        var config = editor.config;
     53                       
     54                        command.modes = { wysiwyg : (!!( editor.element.$.form ) || (typeof config.saveFunction == 'function')) };
     55                       
    4856                        editor.ui.addButton( 'Save',
    4957                                {
    5058                                        label : editor.lang.save,
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy