AndyB
Well-known member
I have an add-on called "Remove Editor Buttons" for XF1.
https://xenforo.com/community/resources/remove-editor-buttons.3628/
I would like to update this add-on to XF2 but I'm not finding a simple solution. It appears currently there's no way to add CSS to hide editor toolbar buttons. So far the only way I'm able to hide any of the editor toolbar buttons is to hack the editor.js file directly by removing the button name.
js/xf/editor.js
Hopefully there's an easy solution so an add-on can be created that allows selecting which buttons to remove.
https://xenforo.com/community/resources/remove-editor-buttons.3628/
I would like to update this add-on to XF2 but I'm not finding a simple solution. It appears currently there's no way to add CSS to hide editor toolbar buttons. So far the only way I'm able to hide any of the editor toolbar buttons is to hack the editor.js file directly by removing the button name.
js/xf/editor.js
Code:
getButtonConfig: function()
{
var buttons =
'clearFormatting,|,bold,italic,underline,strikeThrough,'
+ '|,color,fontFamily,fontSize,'
+ '|,insertLink,insertImage,xfSmilie,xfInsert,'
+ '|,xfCustomPlaceholder,'
+ '|,align,xfList,'
+ '|,undo,redo,'
+ '|,xfDraft,xfBbCode';
var buttonClass = {
_basic: ['bold', 'italic', 'underline', 'strikeThrough'],
_extended: ['color', 'fontFamily', 'fontSize'],
_link: ['insertLink'],
_align: ['align'],
_list: ['formatOL', 'formatUL', 'outdent', 'indent'],
_indent: ['outdent', 'indent'],
_smilies: ['xfSmilie'],
_image: ['insertImage'],
_media: ['xfMedia'],
_block: ['xfQuote', 'xfCode', 'xfSpoiler']
};
Hopefully there's an easy solution so an add-on can be created that allows selecting which buttons to remove.