Reload whole document?

Hi,

how can I reload the whole document of an editor after a user action ? I want the user to enter HTML content into a textarea and load the value into an existing editor, replacing the previous document.

Thank you

EDIT: Maybe I’m overcomplicating things. In fact, what I want to have is a “Paste as HTML” feature. Right now, when a user paste HTML code inside the editor it is interpreted as text and consequenty tags are readable as text. Is this the normal behavior ? Should I need to implement a Paste as HTML feature ?

The starter kit I have at https://github.com/mfoitzik/prosemirror-breakout-starter-kit includes a text box that allows you to paste HTML (as well as view it) and update the editor with it. The code to view and set the HTML should help you with this. Keep in mind that the schema needs to support whatever is entered.

A BIG thank you. That is exactly what I needed.