开发者

how to set content of a speicific node inside tinymce?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜