我有一个使用高级主题的tinyMCE编辑器。我在该高级主题上使用了简单的布局,因此我可以在init()上定义自己的工具栏,而不必深入了解tinyMCE正在做什么。如何添加标题(h1,h2 ...)按钮到具有高级主题,简单布局的tinyMCE?
我遇到的问题是我的编辑器没有添加标题元素的按钮。我迫切需要这个选择,但在这个问题上找不到实际的建议。
一切我做的tinymce.init()函数,我已经粘贴下面里面发生的情况:
$("textarea.tinymce").not(".simple").tinymce({
script_url : "/_lib/script/tiny_mce/tiny_mce.js",
plugins : "wordcount,paste,spellchecker,table",
theme : "advanced",
theme_advanced_layout_manager : "SimpleLayout",
theme_advanced_statusbar_location : "bottom",
theme_advanced_toolbar_location : "top",
theme_advanced_buttons1
: "bold,italic,underline,strikethrough,|,sub,sup,|,charmap,|,forecolorpicker",
theme_advanced_buttons2
: "undo,redo,|,cut,copy,pastetext,pasteword,|,link,unlink,anchor,|,image,code",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_align : "left",
height : 480,
apply_source_formatting : false,
convert_fonts_to_spans : true
});
我使用jQuery插件来访问TinyMCE的(我敢肯定,这有什么好与我的问题做,但它解释了代码)。
我有一个想法是使用theme_advanced_styles选项,但我不认为这将允许我插入实际的标题标签,而只是样式我的标记与跨度和什么不看起来像一个头。
任何想法非常感谢。 干杯, J
你想要一个下拉菜单吗?或者如果你有每个标题元素的按钮就足够了吗? – Thariama 2012-01-05 12:00:33
按钮将是绝对好的。 – 2012-01-05 12:21:11