Nikoole
Nikoole

Reputation: 4603

TinyMCE: Styles dropdown not getting populate

At first sorry for my poor English. My problem is that i am init 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",
});

But on page i see Styles dropdown and it is not opening, when i am click on it. Please, help. What i am missed or doing wrong?

Upvotes: 1

Views: 3568

Answers (2)

Pitamber Tiwari
Pitamber Tiwari

Reputation: 536

You can add style_formats to add styles to the TinyMCE editor. See this fiddle for example.

I usually have all my styles defined in an external css file and use content_css to link them to TinyMCE. This is good if you have more style rules or may use the same style rules in multiple places. It keeps the tinyMCE init() script clean. See content_css for more detail. Here is an example fiddle for content_css implementation.

Upvotes: 3

Thariama
Thariama

Reputation: 50832

You will have to add the style plugin to your plugin list.

Upvotes: 1

Related Questions