TinyMCE

From Code Trash
Jump to: navigation, search

Set Content

	tinyMCE.getInstanceById('t_content').setContent('html content'); 

where t_content is the input field id value;

(or)

     document.getElementById(id).value = val
     tinyMCE.updateContent(id);

Get Content

	var content = tinyMCE.get('t_content').getContent()	

or

	var content = tinyMCE.getContent('t_content')	

where t_content is the input field id value;

Reference

TinyMCE Functions