这是我的 tinymce 代码。我在准备好的事件中使用内容“客户详细信息”填充 tinymce 文本区域。但是即使在文本区域附加了 tinymce 之后,tinyMCE.activeEditor 的评估结果仍为 null
$(function() {
appendTinyMCE();
function appendTinyMCE(){
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "preview",
// Theme options
theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,formatselect,fontselect,fontsizeselect,sub,sup,|,bold,italic,underline,strikethrough",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
width : "640",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});}
alert("tinyMCE.activeEditor"+tinyMCE.activeEditor);// inyMCE.activeEditor is coming as null. Not getting why
if(tinyMCE!=null && tinyMCE.activeEditor!=null)
{
tinyMCE.activeEditor.setContent('Cust Details');
}
});
请让我知道如何在准备好的事件中填充微小的 mce 文本区域?