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

Allow BBCodes to use CSS Wrappers

#1
One of the things that some of us love is the ability on MyBB to use CSS on our BBCodes in order to wrap the content inside a CSS Styled container. I'm fairly sure that adding such a basic and simple option to XenForo 2.0 would be amazing and would help a bunch of us to organize things easier (As this not only adds a somehow cosmetic block but also a block that helps to organize content).

For the record, i've looked into the Suggestions using the Keywords BBCode and CSS and didn't find a similar thread (I might have missed it, so please apologies if it happens to already exist).
 
#3
Can you give a specific example of what this BB code would look like?
Wasn't able to get a screenshot of my old MyBB Setup for their MyCodes but this should hopefully help you understand how it would look if we were able to add css classes to BBCodes and what i'm trying to achieve with BBCodes on xenForo:


Ideally, the easiest way of achieving this is by allowing Custom BBCodes to have a Class Name Field we can fill and then style through our EXTRA.css file.
 

Mike

XenForo developer
Staff member
#4
I was hoping to see the underlying BB code, as I'm not really understanding the suggestion. Or at least, I'm not really understanding what can't be done with a custom BB code right now. If it's a static class name, just adjust your custom BB code output HTML to have that class in the output. If it's a dynamic name, you could create a custom BB code to create a wrapper with the option being the class name.
 
#5
I was hoping to see the underlying BB code, as I'm not really understanding the suggestion. Or at least, I'm not really understanding what can't be done with a custom BB code right now. If it's a static class name, just adjust your custom BB code output HTML to have that class in the output. If it's a dynamic name, you could create a custom BB code to create a wrapper with the option being the class name.
I guess it's mostly a preference kind of suggestion, i also thought about adding it through the HTML Replacement field but still felt it was a bit less user friendly than other Forum Softwares while xenForo is a Premium Software. Perhaps may i suggest a better description for the field to remind the Forum Owner that they can also add classes/styles on it, if it's such a big waste of time to code a Class Field for them?

Best Regards,
Ismael.