Mike de Vrind
Mike de Vrind

Reputation: 183

Saving content while using CKeditor inline

I'm currently using the inline option within CKeditor (4.4.2) to edit different areas in a HTML file. What I want to do is to save the HTML file after someone stops editing a editable area (after the editor closes). But I can't find any information on how to do this in the CKeditor documentation.

Does someone know anything about how to do this? I was excepting some sort of an event to listen to, but I could not find this in the documentation.

Upvotes: 0

Views: 411

Answers (1)

oleq
oleq

Reputation: 15895

Use editor#blur and editor#change events (depending on your needs). Do not use focusout because CKEditor is far more complicated than that (see my previous answer to know why).

You may also find a built-in events buffer (CKEDITOR.tools.eventsBuffer) useful to reduce the number of AJAX calls.

Some ol' jsFiddle.

Upvotes: 1

Related Questions