I have webpage (index.pl), in it's div (id = 'right') i have dynamically loaded a page(editor.pl) containing textarea.To change this textarea as TinyMce editor I have dyanamically loaded a js file (include_tiny_mce.js) which has tinyMce.init() function as below :
$.ajax({
type:'POST',
url:'editor.pl',
success:function(msg){
$("#right").html(msg);
$("head").append("<script src='/include_tiny_mce.js'></script><script src='/scripts.js'></script>");
},
Now all this is working fine and all textareas are changed to tinyMce but when I am using tinyMCE.activeEditor.setContent("hello world");
from a js file (script.js, already included in index.pl) to set content in tinyMce it is not showing the content.
Anyone can tell me the solution for this ?