我想添加多个 TinyMCE 编辑器,每个编辑器在一个页面中都有自己的配置?
我该怎么做?
最佳答案
你可以这样做:
jQuery 版本:
$('textarea.editor1').tinymce(
{
script_url : '../admin/tiny_mce/tiny_mce.js',
theme : "simple",
plugins : "", // put plugins here
setup : function(ed)
{
ed.onInit.add(function(ed)
{
});
}
});
$('textarea.editor2').tinymce(
{
script_url : '../admin/tiny_mce/tiny_mce.js',
theme : "simple",
plugins : "", // put plugins here
setup : function(ed)
{
ed.onInit.add(function(ed)
{
});
}
});
非 jQuery 版本:
tinyMCE.init(
{
mode : "textareas",
theme : "simple",
editor_selector : "editor1"
});
tinyMCE.init(
{
mode : "textareas",
theme : "simple",
editor_selector : "editor2"
});
关于javascript - 如何为每个编辑器添加不同配置的多个 TinyMCE 编辑器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5029077/