I'm using this script to get the content of TinyMCE:
let editorContent;
editorContent.set(tinymce.get("firstEditor").getContent());
After receiving the content, I save it to my database as a string value. When needed I want to be able to retrieve the value and display it in the same TinyMCE editor. I tried using the script below to do so but that ends up displaying [object Object]..
tinymce.get("firstEditor").setContent(editorContent);
Does anybody have some clue to what could cause this problem?
I fount the solution, using ".get()" on the string variable worked!
So instead of:
I used this command: