Commit 0028c608 authored by colemanw's avatar colemanw
Browse files

Fix update-on-blur for the sake of Angular pages like CiviMail

Fixes extensions/ckeditor5#6
parent 5c9d12da
......@@ -209,6 +209,13 @@
instances[name] = editor;
// Update source element on blur; especially important for javascript-based UIs
editor.editing.view.document.on('blur', function() {
editor.updateSourceElement();
$(item).trigger("blur");
$(item).trigger("change");
});
editor.on('destroy', function(e) {
var name = $(e.source.sourceElement).attr('name') || $(e.source.sourceElement).attr('id');
delete instances[name];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment