MyBB Community Forums

Full Version: Help with adding Font Size MyCodes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So for some reason whenever using the standard Syntax such as:

[size=?][/size]

It does not work, So i need to add this code in myself

I am new to coding but i gave it a go but instead while i have the MyCode active it actually deletes all the text xD

[size=\](.*?)\[/size\]

and

<font size="$1"></font>
Was i completely wrong or am i on my way there?
"[size]" is a default one used in the editor.. you need to use "xx-small, x-small, small, medium, large, x-large, xx-large" to use it.. you cant use any numbers though.. if you want to setup a new mycode for this where you could use numbers, you can try this way...

Title: Font Size
Regular Expression: \[fsize=(.*?)\](.*?)\[/fsize\]
Replacement: <font size="$1">$2</font>

however the font tag is bit outdated now and i prefer using css instead, so your replacement will be..

Replacement: <p style="font-size:$1px;">$2</p>
Ahh brilliant. Thank you. Works great! Lovely forum Smile