Javascript 如何将tinymce生成到ajax生成的textarea

Javascript 如何将tinymce生成到ajax生成的textarea,javascript,Javascript,如何将tinymce生成到ajax生成的textarea 有什么帮助吗?如果你给我看一下你的代码,我也许能更好地帮助你。但是,您应该能够调用此函数并将Ajax生成的TextArea的id传递给它 //add this to your Ajax callback that generates the TextArea //replace with the Id of the new textarea var myTextArea = document.getElementById("MyNewTe

如何将tinymce生成到ajax生成的textarea
有什么帮助吗?

如果你给我看一下你的代码,我也许能更好地帮助你。但是,您应该能够调用此函数并将Ajax生成的TextArea的id传递给它

//add this to your Ajax callback that generates the TextArea
//replace with the Id of the new textarea
var myTextArea = document.getElementById("MyNewTextArea"); 
generateTinyMCE(myTextArea);

//Add this function to your script tag
function generateTinyMCE(id) {
 if (!tinyMCE.get(id))
   tinyMCE.execCommand('mceAddControl', false, id);
 else
   tinyMCE.execCommand('mceRemoveControl', false, id);
}

你想用AJAX做什么?您是否试图提交文本区域并实际发布表单?