This is my code:
http://jsfiddle.net/KfVJK/
This is the code to add redactor:
$(document).ready(
function()
{
$('#redactor_content').redactor();
}
);
I want to limit the number of buttons on the toolbar. For example only have basic formatting like bold, italic, etc.
How can I remove buttons from the toolbar?
Use the buttons
setting:
var buttons = ['formatting', '|', 'bold', 'italic'];
$('#redactor').redactor({buttons: buttons});
This is extract from documentation:
By default, this setting contains the following array of toolbar's buttons:
['html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'image', 'video', 'file', 'table', 'link', '|', 'fontcolor', 'backcolor', '|', 'alignment', '|', 'horizontalrule'] // additional buttons // 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify' // If you wish to set your own array, set it in this option: $('#redactor').redactor({ buttons: ['html', '|', 'formatting', '|', 'bold', 'italic'] });
After go through their docs, I would suggest you to setting your button as following:
$('#redactor').redactor({
buttons: ['formatting', '|', 'bold', 'italic']
});
DEMO: http://jsfiddle.net/KfVJK/3/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With