esvit / ng-ckeditor

BSD 3-Clause "New" or "Revised" License
265 stars 137 forks source link

Model not updated after DOM manipulations #73

Open andrewboni opened 8 years ago

andrewboni commented 8 years ago

Hi, it seems that the CKEditor model isn't getting updated after doing:

element.data('cke-saved-src', imageUrl);
element.setAttribute('src', imageUrl);

The CKEditor content renders correctly, but the model never detects a change. Possible similarity to https://github.com/esvit/ng-ckeditor/issues/71 ?

I uncommented those out as per his suggestions, but still no luck:

 instance.on('pasteState',   setModelData);
instance.on('change', setModelData);
instance.on('blur', setModelData);
instance.on('key',          setModelData); // for source view
instance.on('saveSnapshot',          setModelData);