• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How can I remove some of the Redactor toolbar buttons?

AndyB

Well-known member
#1
How can I remove some of the Redactor toolbar buttons? For example I would like to remove the Text color, Font Size and Font Family buttons.

Thank you.
 

AndyB

Well-known member
#5
Okay figured it out. Edit the following file:

/js/redactor/redactor.js

For example to remove the Text Color button, remove the following code found on line #546

Code:
        fontcolor:
         {
           title: RLANG.fontcolor,
           func: 'show'
         },
 

Andy.N

Well-known member
#8
Okay figured it out. Edit the following file:

/js/redactor/redactor.js

For example to remove the Text Color button, remove the following code found on line #546

Code:
        fontcolor:
         {
           title: RLANG.fontcolor,
           func: 'show'
         },
But it will get rewritten the next time you update xF, right?
 

AndyB

Well-known member
#11
I found a better solution to remove the three font buttons.

1) Rename /js/xenforo/bb_code_edit.js to /js/xenforo/bb_code_edit_original.js
2) Copy /js/xenforo/full/bb_code_edit.js to /js/xenforo/bb_code_edit.js
3) Edit /js/xenforo/bb_code_edit.js and comment out the following starting on line #57

Code:
      /*if (!bC || bC.extended)
       {
         buttons.push(['fontcolor', 'fontsize', 'fontfamily']);
       }*/