I want to set content of an element to the first node of the tiny mce. I can retrieve the id of this node, but don't know how to set content inside it.
Help Appreciated. Thanks in advance.
I want to set content of an element to the first node of the tiny mce. I can retrieve the id of this node, but don't know how to set content inside it.
Help Appreciated. Thanks in advance.
You can do that using something like the following. Make sure to enter valid html.
tinyMCE.activeEditor.getBody().firstChild.innerHTML='<span class="customStyle">Testtext</span>';