jquery.dirty
jquery.dirty copied to clipboard
Not working with rich text editor fields
Hi, first of all, thank you very much for the handy plugin. It is really useful and I found it from a stack overflow answer.
My form has a rich text editor fields (CK Editors). Your plugin can detect the dirtiness of all other fields but those rich text editors. Is there any attributes to be set to make it work with rich text editors or it just isn't implemented? If it an unimplemented feature, is there a work around?
Thanks!
After CKeditor is initialised, you need to add an event:
// add change event to set is dirty on the form
editor.model.document.on('change:data', () => {
// find closest form to the textarea element
element.closest('form').dirty('setAsDirty');
});