CKEditor, AJAX Save

后端 未结 10 1471
走了就别回头了
走了就别回头了 2021-01-03 01:22

Can you provide an example on how to setup CKEditor to save via AJAX using the Save button in the CKEditor toolbar?

I\'m interested in creating a CKEditor AJAX save

10条回答
  •  既然无缘
    2021-01-03 01:45

    You can use the beforeCommandExec event & cancel() method:

    
    
    

    Update:

    This doesn't work in CKEditor versions 4.0, 4.1, 4.2, however it works again since version 4.3.

    Since CKEditor version 4.2 you can use the save event with the cancel() method:

    CKEDITOR.instances[id].on('save', function (event) {
        event.cancel();
        $(form).submit();
    });
    

提交回复
热议问题