Opened 8 years ago

Closed 8 years ago

#14874 closed Bug (invalid)

Submit on save does'nt work

Reported by: German Tron Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Steps to reproduce

I have this simple code

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script type="text/javascript" src="ckeditor/ckeditor.js"></script>

<script type="text/javascript"> window.onload = function() { CKEDITOR.replace ('editor1');

$('#test').submit(function(event){

event.preventDefault(); alert('Saved!');

}) } </script>

<form id="test" method="post">

<textarea id="editor1" name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>

</form>

Expected result

When I press on Save button, I have to see the alert 'Saved!'

Actual result

When I press on Save button, The page reload.

I search for this on over the web and a lot of people has the same problem.

Other details (browser, OS, CKEditor version, installed plugins)

Windows 10 Chrome Versión 53.0.2785.116 m Microsoft EDGE 25.10589.0.0 ckeditor_4.5.11_full

ThankYou!!

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

You need to use editor save event if you want to use editor save button.

var editor = CKEDITOR.replace ('editor1');
				
editor.on( 'save', function(  evt ){
	evt.cancel();
	alert('Saved!');
} );
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy