Akenefick
4 years agoGenius
Preloaded Text In Tinymce Editor
I am trying to create a component to add to the PostPage that will prefill the text editor with some questions to answer when posting an idea. I tried using this
tinymce.activeEditor.setContent("<p>Test Question One<br><br><br>Test Question Two</p>");
I also tried
document.getElementById("tinymce").innerHTML = "<p>Test Question One<br><br><br>Test Question Two</p>";
I tried saving a .js file to "Other Assets" so I could "defer" the execution until after the page loads in case that was the issue.
I found this great post Default template for suggesting an idea in Idea Ex... - Atlas (khoros.com) by PerBonomi and tried to use his code minus the category check.
In every case the editor remains blank. Any idea where I might be going wrong? Thanks