Looking at the vbulletin bbcode plugin as a reference, it doesn’t seem like it will be too difficult to just add in support for what we already do. We have all sorts of custom bbcode as seen in the guides, from simple things to a custom div bbcode that lets people essentially use HTML to an extent in a secure manner that generates a custom id selector for the post and users can’t target anything outside of the post container.
This has allowed people to create some really fantastic posts over the years, here is a quick example I found by just glancing around:
I guess my question is, should we make this a bbcode plugin, or attempt to create a safe method where we can keep HTML selectors contained in posts like we do for our BBCode and investigate that method and offer that instead?
Though I shudder at the idea of letting people use HTML
We want to keep users the ability to continue to format their posts while also making sure that everything stays safe.
And lots of it are built-in in Discourse, like code highlight, super/sub script, center block, tables, blockquotes, inline spoilers, dividers, headers, media embed, etc.
Oh noes. That sounds gross. We are running Cloudflare + a decently beefy AMD Ryzen server. Takes about 2 seconds for me to load all assets logged out.
Definitely looking at this. So essentially we can add any HTML/CSS in a theme component and then call it using a custom bbcode tag? [blah]content[/blah]?
So, in this case, we could recreate some of our stuff with:
[wrap=bg bg=blue] or [wrap=random-name newspaper=1]
It might still be for the best that maybe we use something like the Plugin’s format so that a ton of content does not lose formating. Also multi optional arguments.
You might have a look at Discourse BBCode. I think it should be relatively easy to add support for other codes (though, TBH, I had trouble figuring out how to do it. . . )
Could you not have put that whole guide into one Post and made it a Wiki when you felt like adding more? Having it in multiple posts makes it much harder to read and comprehend imho and creates a lot of wasted space.
Also note that Discourse out-of-the-box supports some restricted HTML anywhere in the post content, not just inside a special wrapper. For example, this post is wrapped inside a <div align=justify>. Unfortunately it does mess with some of the inline formatting, forcing HTML for everything in the paragraph.
That bbcode guide is in a different forum software, one that doesn’t have wiki posts.
Awesome. Though I think we’d rather keep it as bbcode that we add in via extending that one plugin then rather finding a way to give everyone more html that we have to make safe.