How does one initialize the contents for a second time? For example I have a dialog with the trix editor in it. Each time I pop up the dialog, I want to be able to reinitialize the content in the editor.
Setting the value to the associated hidden input= field does not work. Seems to only work the 1st time.
If your <trix-editor> is inside a form you can reset the form. Otherwise you can do element.value = "", which is a shortcut for element.editor.loadHTML("").
Thank you.
Most helpful comment
If your
<trix-editor>is inside a form you can reset the form. Otherwise you can doelement.value = "", which is a shortcut forelement.editor.loadHTML("").