lemonde / angular-ckeditor

CKEditor directive for Angular.
137 stars 133 forks source link

Model not updating when i updating image source through widget instance #69

Open gitesh-purbia opened 7 years ago

gitesh-purbia commented 7 years ago

I am updating the image source after uploading it on server and replacing new image source. How can i update the model value after updating image source thorugh widget. Here is a sample code what i am doing :->

pluginsLoaded(event) {
    event.editor.widgets.on('instanceCreated', (evt) => {
    var widget = evt.data;
    widget.on('data', () => {
         widget.setData({
          'src': res.data.results.url,
          'data-cke-saved-src': res.data.results.url
        });
    });
  })
}