Set textarea value with javascript after TinyMCE initializing Set textarea value with javascript after TinyMCE initializing javascript javascript

Set textarea value with javascript after TinyMCE initializing


Problem here is you won't see anything if you enter text or html into your textarea.Your textarea gets hidden when tinymce gets initialized. What you see then is a content editable iframe, which is used to edit and style content. There are several events which will cause tinymce to write its content to the html source element of the editor (in your case your textarea).

If you want to set the content of the editor (which is visible) you will need to call something like

tinymce.get('title').setContent('<p>This is my new content!</p>');

You may also acces the dom elements directly using the following

tinymce.get('title').getBody().innerHTML = '<p>This is my new content!</p>';

or using jQuery

$(tinymce.get('title').getBody()).html('<p>This is my new content!</p>');


You can use the tinyMCE.activeEditor.setContent('<span>some</span> html');

Check this Answer


Simply this works for me

$("#description").val(content);