开发者

how to set content of a speicific node inside tinymce?

开发者 https://www.devze.com 2023-01-09 09:32 出处:网络
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.

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 adva开发者_开发百科nce.


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>';
0

精彩评论

暂无评论...
验证码 换一张
取 消