dasmikko / strapi-tiptap-editor

A drop-in replacement for the strapi editor
MIT License
64 stars 29 forks source link

[question/suggestion] How to trigger refresh editor's content rendering #44

Open alessmar opened 2 years ago

alessmar commented 2 years ago

Hi, first of all thank you for this awesome plugin, it works like a charm with ver 4.4.5 (the latest at this time).

I was wondering if there's a way to trigger the rendering of new content. I have a lifecycle hook that needs to update the text inserted, I can see from the logs that the content of this specific field is properly updated (through event.params.data.myfield = updatedHtml; in the lifecycle hook) but the content in the editor is not updated. I need to go back and click on edit a second time.

Is there a way to automatically update the editor's content ?

alessmar commented 2 years ago

I forgot to specify the the lifecycle hook is triggered on beforeCreate and beforeUpdate events.

SalahAdDin commented 1 year ago

I forgot to specify that the lifecycle hook is triggered on beforeCreate and beforeUpdate events.

I didn't understand your question.