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

XF 1.3 Limit the font size both in the editor and by bbcode

Discussion in 'XenForo Questions and Support' started by imthebest, Jul 6, 2014.

  1. imthebest

    imthebest Formerly Super120

    Hi guys I want to limit the font size in the font drop down menu at the editor and also limit the parsing of the size bbcode up to for example 5 so if size=10 the size used should be 5. Is this possible?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


    Search for "getTextSize". That function validates the sizes. It can be edited to eliminate some sizes.

    You will see it only allows up to 7 by default:

    				switch ($inputSize)
    					case 1: $size = '9px'; break;
    					case 2: $size = '10px'; break;
    					case 3: $size = '12px'; break;
    					case 4: $size = '15px'; break;
    					case 5: $size = '18px'; break;
    					case 6: $size = '22px'; break;
    					case 7:
    						$size = '26px';
    4getmenot, rafass and imthebest like this.
  3. imthebest

    imthebest Formerly Super120

    Thanks, it works! Now how I can remove the options from 1 to 7 that appear when clicking on the "Font Size" control on the editor? I just want three options: 1, 2 and 3 for consistency with the changes I made in Base.php

Share This Page