I am using TinyMce React editor to allow users to create, edit, and save content coming from a database. However, ever. I’m having challenges parsing the HTML content from my database back to the editor.
I used useRef
from react to hold the initialization of the editor, according to the TinyMCE docs, then used the current to getContent
which works, it gives me back what the user typed. However, using the useRef.current.setContent(myDatabaseContent)
.
But I get an error, cannot read properties of null (reading setContent)
Who has used TinyMCE and how did you use it to edit your content? or how did you load your content back into the editor?
Prince Azubuike is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.