Gutenberg Block showing invalid content on edit
The main issue in your code is the following part, whereby you set the attribute source to text which means (after the block/post is saved) the editor will read the value from the inner text of the div returned by your save function: attributes: { content: { type: “string”, source: “text”, // this shouldn’t be … Read more