function toggleEditor(id) {
if (!tinyMCE.get(id))
tinyMCE.execCommand('mceAddControl', false, id);
else
tinyMCE.execCommand('mceRemoveControl', false, id);
}
- <form method="post" action="somepage">
- <textarea name="content" style="width:100%">
- </textarea>
- </form>
- <a href="javascript:toggleEditor('content');">Add/Remove editor</a>
相关文章
http://hi.baidu.com/ankyliu/blog/item/a8dbabcd420d555a0fb345d5.html