angular-ui / ui-tinymce

AngularUI wrapper for TinyMCE
MIT License
488 stars 370 forks source link

Model is not saved after inserting images with native image plugin #210

Open rbecheras opened 8 years ago

deeg commented 8 years ago

Can you please add a plunker reproducing the issue so we can take a closer look at it?

deeg commented 8 years ago

Adding an image via the native image plugin should fire a changed event.

See this plunker. The model seems to update for me when I insert an image.

Can you explain when SetContent is needed?

gera2ld commented 8 years ago

Similar problem here.

After setContent the dirty state remains false, which blocks content update in ui-tinymce. My solution is:

editor.setContent(...);
editor.setDirty(true);
editor.fire('change');
rbecheras commented 8 years ago

Oh, thanks for this notice @gera2ld , I didn't see that point before. I think this is a great clue to correctly resolve the issue. I'll look at that again in detail shortly.

ashxerion commented 7 years ago

Thanks @gera2ld that was a big help!

garyfagan commented 7 years ago

likewise thanks @gera2ld :)