I’m using CKeditor to allow users to inline edit the content on a page once logged in.
I know I can access the data using:
var data = CKEDITOR.instances.editable.getData();
but I don’t know how to send the data to a script so I can update the database. It would be cool if the script ran each time someone deselected a contenteditable element… but I don’t know if thats even possible.
Any tips would be great! 🙂
My site is built using php/mysql.
Something like this:
Note that this won’t work with other interactions like: user called
editor.setData()or user closed the web page while editing. Contents will be lost in such cases. If I were you, I’d rather periodically check for new data: