How can i do this
function addTinyText(id, text){
//add textarea to DOM
$('<textarea id="txt'+id+'"></textarea>').append(text).appendTo('body');
//init tineMCE
tinyMCE.init({
theme : "advanced",
plugins : "emotions,spellchecker"
});
//add tinymce to this
tinyMCE.execCommand("mceAddControl", false, 'txt'+id);
}
but as a result every time we have a new textarea+tinyMCE but no text inside
What do i wrong?