Possible to configure optional tokens?

Get help developing custom BBCodes or request one.
Post Reply
kbowen0188
Registered User
Posts: 6
Joined: Thu Dec 13, 2012 12:20 pm

Possible to configure optional tokens?

Post by kbowen0188 » Thu Jan 12, 2017 2:48 am

I have managed to get this Style BBcode working:

BBCode usage:

Code: Select all

[style=width:{NUMBER1}px; margin-top:{NUMBER2}px; margin-bottom:{NUMBER3}px; box-shadow:{NUMBER4}px {NUMBER5}px {NUMBER6}px {COLOR1}; background: {INTTEXT1}({COLOR2},{COLOR3},{COLOR4},{COLOR5}); font-family:{INTTEXT2}; font-size: {NUMBER7}%; color:{COLOR6};]{TEXT}[/style]
HTML replacement:

Code: Select all

<div style="width:{NUMBER1}px; margin-top:{NUMBER2}px; margin-bottom:{NUMBER3}px; box-shadow:{NUMBER4}px {NUMBER5}px {NUMBER6}px {COLOR1}; background: {INTTEXT1}({COLOR2},{COLOR3},{COLOR4},{COLOR5}); font-family:{INTTEXT2}; font-size: {NUMBER7}%; color:{COLOR6};">{TEXT}</div>
However, I have been unable to figure out how to make any of the attributes optional. For instance, if someone wouldn't like a box-shadow in their Style, it'd be nice if they could just omit it without the BBCode breaking. Thoughts?

Post Reply

Return to “Custom BBCode Development and Requests”