1. 0
No votes yet

2774048 downloads save

  • Add to my editor
  • Download

    CKBuilder

    The recommended way to install all CKEditor add-ons is to create a custom build by using CKBuilder. To do that, click the Add to my editor button on the plugin page. When you are done, click the Build my editor button on the right side of the page to go to CKBuilder.

    Add-on Installation Instructions

    If you want to add the plugin manually, you will need to:

    1. Extract the downloaded plugin .zip into the plugins folder of your CKEditor installation. Example:
      http://example.com/ckeditor/plugins/save
    2. Enable the plugin by using the extraPlugins configuration setting. Example:
      config.extraPlugins = 'save';
    3. Download and configure all its dependencies, too.

    Add-on Dependencies

    No additional dependencies.

Save

When CKEditor is placed inside an HTML form this plugin saves the contents of CKEditor and submits it to the server. Also, it adds save toolbar button which submits form in which editor is placed.

Releases

Plugin versions CKEditor versions
4.4 4.3 4.2 4.1 4.0

Version: 4.4.3 - Download

Show notes

Another bug-fixing release for the 4.4 series.

compatibleunknown compatibilityunknown compatibilityunknown compatibilityunknown compatibility

Version: 4.3.5 - Download

Show notes

Another bug fixing release for the 4.3 series

unknown compatibilitycompatibleunknown compatibilityunknown compatibilityunknown compatibility

Version: 4.2.3 - Download

Show notes

Another bug fixing release for the 4.2 series

unknown compatibilityunknown compatibilitycompatibleunknown compatibilityunknown compatibility

Version: 4.1.3 - Download

Show notes

The next bug fixing release for CKEditor 4.1.x series

unknown compatibilityunknown compatibilityunknown compatibilitycompatibleunknown compatibility

Version: 4.0.3 - Download

Show notes

Another bug fixing release for the 4.0 series

unknown compatibilityunknown compatibilityunknown compatibilityunknown compatibilitycompatible
Log in to rate this plugin

Comments

Post a comment
  1. The content of this field is kept private and will not be shown publicly.
  1. This won't load using CKEDITOR.appendTo() to attach editor to DIV .. I have trying CKBuilder, manual install, and still not showing up. I am loading the editor via AJAX .. any ideas?

  2. BradFromFuse's picture

    BradFromFuse

    Reply

    Hey, just FYI, the form submit this plugin uses doesnt play nicely with jquery event handlers. I use a jquery event handler to intercept form submission and do the save via ajax, but calling submit directly on the DOM object doesnt work.

    However, i just did a copy/paste of the plugin and raised a jquery event instead of calling submit() and that seems all good.

     

  3. Jens's picture

    Jens

    Reply

    On the last project I used CKEditor, the editor wasn't inside a form, so the button from this plugin was just stuck in the "disabled" state (for some reason)..

    What I did then, was to add my own plugin. And instead of adding a button, it just add a command that fires the "save"-event with the current data..  And by giving it the name of "save", it replaces/overwrite the command for this (save) plugin.

    example:

    (function() {

        var saveCmd = {
            modes:{wysiwyg:1,source:1 },
            readOnly: 1,

            exec: function( editor ) {
                editor.fire("save", editor.getData());
            }
        };

        var pluginName = 'createSave';

        // Register a plugin named "createSave".
        CKEDITOR.plugins.add( pluginName, {
            init: function( editor ) {

                // overwrite the "save" command.. ;)
               editor.addCommand( "save", saveCmd);
            }
        });
    })();

    • Jens's picture

      Jens

      Reply

      Oh.. And remember to save the plugin in "plugins/createSave/plugin.js", and add this plugin in the config.js with:

      config.extraPlugins = 'createSave';

      ;)

  4. Zelta's picture

    Zelta

    Reply

    Once I needed not just post my form, but do some other actions, so i had to override plugin like this:

    (function() {
        var saveCmd = {
            readOnly: 1,

            exec: function(editor) {
                if (editor.fire('save')) {

                    var $form = editor.element.$.form;

                    if (editor.config.onSave) {
                        editor.config.onSave(editor) // If custom action is set, do it.
                    } else if ($form) {
                        try {
                            $form.submit();
                        } catch (e) {
                            // If there's a button named "submit" then the form.submit
                            // function is masked and can't be called in IE/FF, so we
                            // call the click() method of that button.
                            if ($form.submit.click)
                                $form.submit.click();
                        }
                    }
                }
            }
        };

        var pluginName = 'save';

        // Register a plugin named "save".
        CKEDITOR.plugins.add(pluginName, {
            lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
            icons: 'save', // %REMOVE_LINE_CORE%
            hidpi: true, // %REMOVE_LINE_CORE%
            init: function(editor) {

                // if ( editor.elementMode != CKEDITOR.ELEMENT_MODE_REPLACE )
                //     return;
                // I do not need this, but you can enable.

                var command = editor.addCommand(pluginName, saveCmd);
                command.modes = { wysiwyg: !!(editor.element.$.form || editor.config.onSave)};

                editor.ui.addButton && editor.ui.addButton('Save', {
                    label: editor.lang.save.toolbar,
                    command: pluginName,
                    toolbar: 'document,10'
                });
            }
        });
    })();

    So now you can specify action of this button using

    function mySave(editor) {
        // do some magic;
    }

    config.onSave = mySave;