这是我的代码:
这是添加编辑器的代码:
$(document).ready(
function()
{
$('#redactor_content').redactor();
}
);
我想限制工具栏上的按钮数量。例如,只有基本格式,如粗体、斜体等。
如何从工具栏中删除按钮?
最佳答案
使用按钮
设置:
var buttons = ['formatting', '|', 'bold', 'italic'];
$('#redactor').redactor({buttons: buttons});
这是摘自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'] });
关于jquery - 从编辑器所见即所得中删除按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13048128/