2013-06-20 20 views
1

起初对不起我的英文不好。 我的问题是,我的init tinyMCE的:TinyMCE:样式下拉列表不能填充

tinyMCE.init({ 
    mode : "textareas", 
    theme : "advanced", 
    editor_selector : 'testClass', 
    theme_advanced_toolbar_location : "top", 
    theme_advanced_toolbar_align : "left", 
    theme_advanced_statusbar_location : "bottom", 
    plugins: "pagebreak,fullscreen,media,advimage,paste,searchreplace,advlink", 
    theme_advanced_buttons1 : "save_button,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,styleselect", 
    theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,|,anchor,|,image,|,cleanup,|,help,|,code", 
    theme_advanced_buttons3 : "hr,removeformat,|,visualaid,|,sub,sup,|,charmap", 
}); 

但页面上,我看到样式下拉列表,它是不开放,当我点击它。请帮忙。我错过了什么或做错了什么?

+0

你在用tinymce 4吗? – Thariama

+0

Thariama, majorVersion: '3', minorVersion: '4.8', RELEASEDATE: '2012-02-02', – Nikoole

回答

3

您可以添加style_formats以添加样式到TinyMCE编辑器。例如 请参见此fiddle

我通常会将所有样式定义在外部css文件中,并使用content_css将它们链接到TinyMCE。如果您有更多的样式规则或者可能在多个位置使用相同的样式规则,则这很好。它保持tinyMCE init()脚本清洁。有关更多详细信息,请参见content_css。这里是content_css实现的示例fiddle

+0

Pitamber Tiwari,非常感谢! Thariama,你也是! – Nikoole

1

你将不得不添加样式插件到你的插件列表。

+0

Thariama,很抱歉,但我怎样才能做到这一点?我编辑初始参数: 插件:“pagebreak,全屏,媒体,advimage,粘贴,searchreplace,advlink,样式”, 但看不到效果... – Nikoole