froala / vue-froala-wysiwyg

Vue component for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
633 stars 86 forks source link

Model is not updated in HTML mode #88

Closed AdrienPoupa closed 5 years ago

AdrienPoupa commented 5 years ago

Even when I enable immediateVueModelUpdate, the model does not update when I am in the HTML mode.

This is a problem as this makes it impossible to save the user's content without going back to the WYSIWYG mode to update the model first.

You can reproduce it here: https://codesandbox.io/s/vue-template-zjik6

  1. Type text in HTML mode
  2. See that the model is not updated below the editor
ilyaskarim commented 5 years ago

@stefanneculai any updates on this and are you able to reproduce the issue on https://codesandbox.io/s/vue-template-zjik6?

AdrienPoupa commented 5 years ago

Please see the following video that describes it https://www.youtube.com/watch?v=IqTAjvEUwMs

ilyaskarim commented 5 years ago

Hi @AdrienPoupa Please see this youtube video I uploaded https://youtu.be/T-MF5I9GyQg, I used your same sanbox and it is working fine for me.

AdrienPoupa commented 5 years ago

You reproduced the exact issue we are talking about. The model/output (text below the editor) should be updated as you type WHILE you are in the HTML mode, not when you exit it.

In other words: you should see and checking here below the editor as you type it, not when you return to the WYSIWYG mode.

Do you understand?

ilyaskarim commented 5 years ago

@AdrienPoupa This is not a bug. When you switch from code view to edit view. The editor is designed in a way that it copies data from textarea when you go to view mode, not in realtime.

AdrienPoupa commented 5 years ago

From the documentation: https://www.froala.com/wysiwyg-editor/docs/framework-plugins/vue

immediateVueModelUpdate: (default: false) This option updates the Vue model as soon as a key is released in the editor. Note that it may affect performances.

When I set it to true I expect the model to be updated at all time.

It should not care whether we are in HTML or WYSIWYG