If anyone has this fix/addition i'll appreciate the help. Searching for days after this fix.
The problem is that MyBB SIZE tag uses text instead of numbers, example: [size=x-large]My title[/size]. Adding this to the formatter isn't so easy as it looks like for some reason.
In Config.php I've tried the following lines:
$configurator->BBCodes->addCustom('[size={CHOICE=large,small,xx-small,x-small,medium,x-large,xx-large}]{TEXT}[/size]','<span style="font-size:{CHOICE}">{TEXT}</span>'); //not working for me.
$configurator->BBCodes->addCustom('[size={TEXT1}]{TEXT2}[/size]', new UnsafeTemplate('<span style="font-size:{TEXT1}">{TEXT2}</span>')); //not working for me either
On both "solutions" the parser does this:
<span style="font-size:x-largepx">My title</span>
It add "px" at the end every damn time.
Need help with this. I searched my ass off where the "px" comes from.
If anyone has this fix/addition i'll appreciate the help. Searching for days after this fix.
The problem is that MyBB SIZE tag uses text instead of numbers, example:
[size=x-large]My title[/size]
. Adding this to the formatter isn't so easy as it looks like for some reason.In Config.php I've tried the following lines:
On both "solutions" the parser does this:
It add "px" at the end every damn time.
Need help with this. I searched my ass off where the "px" comes from.