Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TinyMCE: How to get rid of some buttons

I'm trying to make a minimal implementation of TinyMCE. The only buttons I want are bold, italic, font size, font color, links and undo/redo.

I've trimmed the example from their fiddle demo, and I've been able to remove many of the undesired buttons.

This is what I've reduced the init to, but I don't see what else I could possibly eliminate. Is there a separate config I failed to find? With this, I still get list buttons, super/subscript and remove formatting and insert special character...

tinyMCE.init({
    // General options
    mode: "textareas",
    theme: "advanced",
    plugins: "", //note, i've removed every plugin for demnstration, stll have unwanted buttons

    // Theme options
    theme_advanced_buttons1: "|,bold,italic,|,fontsizeselect,|,forecolor,",
    theme_advanced_toolbar_location: "top",
    theme_advanced_toolbar_align: "left",
    theme_advanced_statusbar_location: "bottom",
    theme_advanced_resizing: true,
    theme_advanced_text_colors : "FF00FF,FFFF00,000000",
    width: "100%",
    height: "400"
});
like image 510
FlavorScape Avatar asked Feb 21 '23 20:02

FlavorScape


1 Answers

Under the theme options, you can enter what you want to have disabled by using theme_advanced_disable. For example to get rid of the subscript and superscript buttons, add the following code:

theme_advanced_disable : "sup,sub"
like image 151
dpcasady Avatar answered Feb 27 '23 15:02

dpcasady