Home Ask Login Register

Developers Planet

Your answer is one click away!

Hamid February 2016

get save button click event in ckeditor

How can I get the click event of a save button in Ckeditor?

<form method="post" action="insert.php" class="formSubmit">
     <textarea name="editorAbout" id="editorAbout" rows="10" cols="80">

                var roxyFileman = 'fileman/index.html'; 
                 CKEDITOR.replace( 'editorAbout',{filebrowserBrowseUrl:roxyFileman,
                            removeDialogTabs: 'link:upload;image:upload'}); 


Scorpio1337 February 2016

Save button in CKEditor triggers submit event in parent FORM. So in this case you can catch this with this code:

$('.formSubmit').submit(function () {
        alert('Save button click');

Or if you need really catch save button click, you must do it via finding element of it.

$('.formSubmit .cke_button__save').click(function() {
        alert('Save button click');

I hope it helped you.

Post Status

Asked in February 2016
Viewed 2,732 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life