我正在将文本框动态添加到 div 中。像这样的东西
$('#xyz').click(function()
{
$(#myDiv).append('<textarea></textarea>');
});
现在我想将tinymce编辑器附加到这些文本区域,你能帮我做到这一点吗?
最佳答案
试试这个:
$('#xyz').click(function() {
var myTextarea = $("<textarea></textarea>");
myTextarea.attr("id", "mce-editor");
$("#myDiv").append(myTextarea);
// this inistalises the TinyMCE editor upon the element with the id in the last parameter.
tinyMCE.execCommand("mceAddControl", false, "mce-editor");
});
关于c# - 动态添加TinyMCE编辑器到文本框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6016614/