I am using Ckeditor, for one of my project. It has feature of "maximize" in which, it readers in full browser window. The problem is when I click on browser back button, it goes to the previous page, loosing the content of the form.
Can we make it in a way, that when I click on browser back button, it goes back to the form instead of previous page.
-- Thanks for your time.
You cannot overwrite the back/forward functionality of any browser since it would violate many security aspects. See: How to disable Back button in IE and firefox?, https://stackoverflow.com/a/12103965/1485219
At most, you can display an alert to let user know about unsaved data etc. Maximized CKEditor instance is nothing more than a block element positioned to cover the entire webpage. It has nothing to do with browser navigation.
Anyway, if you wish to maximize editor with your code:
CKEDITOR.instances.yourInstance.execCommand( 'maximize' );
console.log( CKEDITOR.instances.yourInstance.commands.maximize.state );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With