New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Resize Plugin does not mark Editor Content as "dirty" #903
Comments
My workaround currently is to do $("#myeditor").trumbowyg('toggle') on save and then get the content of the editor. The toggle switches to HTML mode, which seems to trigger an update of the content. After uploading the content to the server, I toggle again to go back to rich text mode. |
The cleaner way to force a content refresh is to call Also, I think the |
|
Yep, but it should call |
I agree and tried it with my application and it seems to work. Will create a pull request. |
Informations
Firefox 64.0 on Mac OS.
How to reproduce the bug?
document.getElementById('editor');
<div id="editor" style="margin: 1rem; height: 237.8px;" class="trumbowyg-editor" dir="ltr" contenteditable="true">
document.getElementById('editor');
againThe problem is, if Trumbowyg were used in a real application and that application would have a "Save" button and the user would press it to save after a resize operation, then the old size would be saved. And the user would have no chance of noticing, because on-screen everything looks right. I suspect that the image resize operation doesn't mark the editor content as "dirty" or perhaps forgets to call some update/refresh command on Trumbowyg.
The text was updated successfully, but these errors were encountered: