Reputation: 14309
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"
});
Upvotes: 4
Views: 4325
Reputation: 4328
This comment was addressing TinyMCE 3.X
You need to empty out the second (an possibly third) set of buttons
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
//etc
TinyMCE 4.
The default toolbar in V4 only seems to have a single set of buttons so the above answer for 3. is a bit misleading. In V4, if you don't specify a toolbar, it'll build one for you.
To set what buttons show up in a toolbar, just specify what items you want.
Single toolbar
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter
Multiple Toolbars
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
toolbar2: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
OR
toolbar: [
"insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
"insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
]
Official Docs:
Upvotes: 4
Reputation: 1846
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"
Upvotes: 4
Reputation: 927
You should be able to remove the plugins in the code snippet you mentioned. Just remove what you don't need, and it should adjust.
Upvotes: 0