BBCode is a bit like fax machine repair, or writing code in Adobe Cold Fusion. Itās not really a set of skills you want to be developing, per se.
Sounds like something I could learn from a discounted course from Boing Boing Store
@codinghorror I just wish that instead of just immediately excising the BBCode for size you could have set up something else to replace it first, if that is even possibleā¦ is it? Can you change size at a staggered level in html or markdown? Because if so, implementing that would be amazing.
Like Small, Medium, Large?
Like <small>Small</small>, Medium, <big>Large</big>?
smaller
small
<small><sub>smaller</sub></small>
<small>small</small>
smaller
small
normal
<big><sub>fairly big, though messes with spacing</sub></big>
fairly big, though messes with spacing
big
Thereās a whole rainbow of ransom note material in html.
Why not? In a typical week Iām far more likely to use BBcode than I am to use Markdown, though HTML does far outweigh the both of them together. Am I supposed to just refuse to participate in a forum until the software supports Markdown?
Was support for a subset of HTML added relatively recently? Or was it expanded recently?
The thing is I had definitely tried various HTML tags in this system at one time or another, and I would swear I found that none of them worked for me. As HTML is commonly filtered for security reasons and it wasnāt documented that they should work, I assumed that all HTML tags were in fact filtered and that only Markdown was supported. I didnāt know BBCode was supported, or I might have tried the [size] tags. (And of course, the wondrous reference page didnāt exist at that time.)
I am fairly sure at one time I specifically tried to use <sub> and </sub> as a hack to get smaller text, and that didnāt work, so I fell back on using Markdown for an H5 or H6.
HTMLās worked for a long time. Itās a subset, but has most things thatād be useful.
general text formatting:h1, etc.
b i synonym for `` u big smallthis is wrongthis is more wrongteletypeblockquote.other elements: paragraph:
more blockquotepara
quote: Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. address: super handy to be able to format addresses in case we want to use snail mailcode
unordered lists:
- one
- two
- one
- two
- Coffee
- Black hot drink
- Milk
- White cold drink
left, right, center, justify
Summary
content
other content
general text formatting:
h1, etc.
b i synonym for `` u big smallblockquote.
more blockquote
other elements:
paragraph:
para
quote: Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. address: super handy to be able to format addresses in case we want to use snail mail code
unordered lists:
- one
- two
- one
- two
- Coffee
- Black hot drink
- Milk
- White cold drink
(some attributes are supported too)
left, right, center, justify
Summary
content
other content
thereās also <pre>
which I used to escape all that crap. Iām sure thereās more tags, looking through the sanitizer on github it supports a lot, though I donāt know where the whitelist is for comments, and I skipped skipped sub/big/small/etc., since we were slinging those all over here.
Itās worked from day one for Discourse for me. HTML subset often comes right along with whatever library is being used for the Markdown.
Discourse seems to use a fairly vanilla Markdown. Iāve yet to find any of what I would consider ā¦ common additions (tables, footnotes, task lists, strikes through double tildes, etc.). Although Iām not a mathematician. Maybe the usual extensions for putting in formulas are there.
While I personally Markdown, I think Gruber & Co. were a little short sighted with their original feature set. And way more short sighted with their responses to folks who wanted to extend it.
How odd. I wonder why I wasnāt getting it to work. Oh well, never mind then.
Add to wiki please.
Oh my god, we can do that??!?! I never ever, never ever, ever never, ever even knew that we could do that. You have changed my world. Also, this is why we need a wiki, and speaking of wikiās: please add this, and all that other fun stuff, to wiki !
I'm still trying to look for the whitelist so we can have a more definitive list. Be right back to add some edits.
Does justification work?
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Marvellous. Thatāll keep things nice and tidy.
So in messing with the html itās pretty much all there with a few things filtered like many tag attributes (these are sketchy and rightly stripped, styling is sketchy), form elements (we arenāt creating forms), ways to inject JS (which is necessary), and tables. Not sure whatās with the tables being missing, though I have suspicions.
That being the case wouldnāt it just make more sense to link to an html tutorial?
header | header |
---|---|
col | col |
At some point <big>
went away, though <small>
works. I know <sub>
also used to work, and think <sup>
used to as well. Was there a purge of these things?
We revamped the markdown parser and converted everything to ES6. The whitelister was replaced, and in the process, some errors in the allowed tags creeped in that have been ironed out, will probably be deployed here soon! cc @eviltrout
Thanks. Chemical formulas without proper superscripts and subscripts set my teeth on edge.
Thank for the quick reply!