Markdown Tutorial
-
This appears to be the most complete information on Markdown: http://daringfireball.net/projects/markdown/syntax.
Discourse accepts HTML tags as well as Markdown Syntax. The tutorial below doesn't really cover HTML tags (at the moment), though it explains some of the basics at the bottom. HTML tags don't accept style, class, or name attributes, though, so don't bother trying to create signature guy with it.
@Zecc supplied much of the info below (especially on how to not count, create headings, and create bullet lists) in (possibly now deleted) posts.
I apologize for the FAUX hyperlink headings, but I couldn't find another way to abuse text color so the headings would stand out in a sea of black and bold text ....
Add Horizontal Rule
Code:
(blank line) ---
or
(blank line) ***
Result:
Code:
(blank line) Heading 1 to Format === (blank line) (blank line) Heading 2 to Format --- (blank line)
or
# Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 ##### Heading 5 ###### Heading 6 <small>small</small>
Result:
Heading 1 to Format
Heading 2 to Format
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
small
Code:
```Language [Code goes here] ```
Note: there is currently a bug in the Markdown parser where invalid language hints can break the parser.
or
Indent Four Spaces
or
Inline `code` surrounded with backticks
Result:
[Code goes here]
Indent Four Spaces
Inline
code
surrounded with backticks
Code:
**strong text** __strong text__
Result:
strong text
strong text
Code:
*emphasized text* _emphasized text_
Result:
emphasized text
emphasized text
Code:
This is some text with an [embedded](http://what.thedailywtf.com) hyperlink.
or
This is some text with a [footnote][1] hyperlink. This is some text with a [footnote][2] hyperlink and some hover text. [1]: http://what.thedailywtf.com [2]: http://what.thedailywtf.com "purple monkey dishwasher"
or
http://what.thedailywtf.com
Result:
This is some text with an embedded hyperlink.
This is some text with a [footnote][1] hyperlink.
This is some text with a [footnote][2] hyperlink and some hover text.
[1]: http://what.thedailywtf.com
[2]: http://what.thedailywtf.com "purple monkey dishwasher"
Code:
![Alt text](http://what.thedailywtf.com/uploads/default/1/5c18e037abe588a0.gif)
Result:
Code:
This is how to tag the asshole @sam who thinks actual tutorials and FAQs would not be helpful for Discourse.
Result:
This is how to tag the asshole @sam who thinks actual tutorials and FAQs would not be helpful for Discourse.
Code:
(blank line) + Item 1 * Item 2 - Item 3 (blank line)
Result:
- Item 1
- Item 2
- Item 3
Code:
14. I'm 7. terrible z. with 99. ordering 0. numbers
Result:
- I'm
- terrible
z. with - ordering
- numbers
#Escape Markdown Characters
The backslash\
is the escape character in markdown. The following characters may need to be escaped for proper formatting:- \
- `
- *
- _
- {}
- [, ]
- (, )
- #
- +
- -
- .
- !
Code:
Example Escaped Backslash: \\
Result:
Escaped Backslash: \
Title:
Anything starting withPoll:
There are no longer any title requirements for polls.Code:
[poll] - Yes - No - File Not Found [/poll]
Result:
http://what.thedailywtf.com/t/poll-infinite-scrolling/ (raw)
Remember, you must start your topic title withPoll:
.
Code:
> Text to Quote >> Text to Quote
Result:
Text to Quote
Text to Quote
#Encoded Characters
I don't know what else to call this?Code:
— Gets you an html &emdash;
Result:
— Gets you an html &emdash;
Code:
<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Del</kbd>
Result:
Ctrl + Alt + Del
You can input HTML that is run through a parser and sanitizer. Be careful: Invalid HTML, such as a stray
<
, may result in the rest of the line <being deleted.Though the align attribute is not supported in html5, most browsers seem to support it. It can be used to center and right-align text.
Markdown does not 'play nice' inside HTML tags, so don't mix your markup. Discourse also strips name attributes from tags.
A list of known HTML tags:
<blockquote>
<code> <pre>
<div> <p>
<details><summary>
<a> <img>
<i> <s> <em> <b> <sup> <sub> <mark> <small>
<dl><dt><dd>
<blockquote><details><summary>Click <b>to <mark>expand</mark></b></summary><p>Some <i>expanded</i> text!</p><p>Filed under: <a href="#tag">tags</a></p></details></blockquote>
Raw Post Text: http://what.thedailywtf.com/raw/382
-
Can a mod pin/sticky this thread?
Also, I'm not sure it was done how but the FAQ thread is editable by all users. Seems like that could be handy here.
-
Here's how to do a poll:
[poll]
- Option 1
- Option 2
- Option 3
[/poll]
-
Can a mod pin/sticky this thread?
I'd be happy to -- oh, wait, I still don't have mod powers!
-
Do stickies exist?
-
This post is deleted!
-
Code
14. I'm 7. terrible 42. with 0. numbers
Result
- I'm
- terrible
- with
- numbers
-
-
I'll remove my posts after @rad131304 as done editing so it all stays in one post, but I have to go now. See you later.
Edit: I deleted the first, longer post but left the second one as a couple of people liked it and
jo..error quoted it.
-
Is there a timeout to how long I can edit my posts?
-
Is there a timeout to how long I can edit my posts?
I don't think so. I haven't noticed any of mine that I can't still edit.
-
There's also <mark><mark></mark> for doing highlighting, <sup> for superscripts and <sub> for subscripts. The last two are really
HTML markup tagsabusable.
-
This post is deleted!
-
Incidently, you can also use these:HTML markup tagsabusable<strike> Strikethrough </strike> <s> (also struck out) </s> <b> Bold </b> <i> Italic </i> <u> underline </u>
to get
Strikethrough
(also struck out)
Bold
Italic
underline
This:
<abbr title="Long text shown on hover">Abbrev.</abbr>
yields
Abbrev.
Writing
<del>deleted</del> <ins>inserted</ins>
results in
deletedinserted
And this:
<img title="Title is the attribute that is shown on hover, not alt" src="http://what.thedailywtf.com/uploads/default/72/293cb41e2564427a.png"> <a title="Same for links" href="#">Link!</a>
gives you this:
And look what fun:
<div align="left">I'm coming</div> <div align="center">over</div> <div align="right">there.</div> <progress title="Loading...">Progress indeterminate</progress> <progress min="0" max="100" value="33">33%</progress> <meter title="Ranking" min="0" max="10" value="7" >7 out of 10</meter> <blink>If these were accepted</blink> <marquee direction="left" scrollamount="5">I'd go on a murderous rage</marquee>
becomes:
I'm comingoverthere.<progress title="Loading...">Progress indeterminate</progress> <progress min="0" max="100" value="33">33%</progress> <meter title="Ranking" min="0" max="10" value="7" >7 out of 10</meter> <blink>If these were accepted</blink> <marquee direction="left" scrollamount="5">I'd go on a murderous rage</marquee>
-
This:
<table> <tr> <td> Have you got tabular data</td> <td> you'd like to show? </td> </tr> <tr> <td> Fat chance! </td> <td> It gets swallowed. </td> </tr> </table> :(
Will get you:
Have you got tabular data you'd like to show? Fat chance! It gets swallowed.
-
I heard on the grapevine that
<progress>
and<meter>
are getting nuked from the sanitizer. No big loss there.However, don't take my
<details>
away from me.It's the best!
-
FYI, seems as though there's a post limit length.
See bug report: http://what.thedailywtf.com/t/bug-report-post-length-limit-not-enforced-on-post-edit/386
-
Is there a timeout to how long I can edit my posts?
Yup.Ninja edits (i.e. doesn't show as a separate edit) currently 5 minutes from first posting, diffed edit currently a year. @rad131304 said:
FYI, seems as though there's a post limit length.
I've just doubled the limit to 64000 chars in light of that.
-
bump
Hopefully this will bring it back into people's memory so that something useful finally gets pinned around here
-
Open to suggestions.
Preferably those that can be updated easily by copy-pasting the output of a line of bash-script</joke>...
I'll get something together later.
-
Hopefully this will bring it back into people's memory so that something useful finally gets pinned around here
This the sort of thing you had in mind?
-
This the sort of thing you had in mind?
I was thinking specifically just pinning this post, but that works, too.
-
I was thinking specifically just pinning this post
Too much cruft in here, with the useful stuff amongst it. And as I pointed out in the discussion page for that pin, the actual "how to do simple shit" instructions on the respective reference pages is largely better done, and more concise than here or anything I could come up with.
I suppose I could have 'done a Jeff' and simply deleted or moved the cruft on this thread though, I suppose...
-
I suppose I could have 'done a Jeff' and simply deleted or moved the cruft on this thread though, I suppose.
Thank you for not doing that.
-
Too much cruft in here, with the useful stuff amongst it. And as I pointed out in the discussion page for that pin, the actual "how to do simple shit" instructions on the respective reference pages is largely better done, and more concise than here or anything I could come up with.
I suppose I could have 'done a Jeff' and simply deleted or moved the cruft on this thread though, I suppose...
Completely valid points, and I thought you did a fine job on your intro.
-
Thank you for not doing that.
I think I need to file another bug; my sarcasm tags keep going missing.
Honestly, it was less effort to write that post from scratch and get it how I wanted it than to mangle this thread beyond all recognition to get even half the information retained, and even if I had, it would have been at the expense of pissing off the people who spent the effort and bothered to contribute (crufty or not) to this thread.
-
-
Why is this link not working?
Clicking it takes me to a cartoon strip. What about it isn't working?
-
Suggestion: add an xkcd tag.
So this:
[xkcd:285]
Displays this:
-
-
awww, who edited my post? damn you, system!
-
Bug: XKCD images are replaced by Khalid Sheikh Mo'donell
-
NOTABUG. See Rosie O'Donnell meme on the CS forum...
-
NOTABUG. See Rosie O'Donnell meme on the CS forum...
Can I find it by tapping my heels three times and scrolling infinitely?
-
Clicking it takes me to a cartoon strip. What about it isn't working?
I want to see the cartoon in the post itself and not outside the post.
-
This post is deleted!
-
Probably because dilbert.com isn't on the whitelist/have a convenient URL that displays just the cartoon that could be whitelisted.
http://dilbert.com/2014-06-03/
That last is just a link to the gif thus automatically whitelisted but I suspect given the URL it's not a permaURI, but the system will probably cache it anyway.
-
Great idea, @PJH
-
-
Probably because dilbert.com isn't on the whitelist/have a convenient URL that displays just the cartoon that could be whitelisted.
You mean like http://dilbert.com/fast/ ?
-
Given, on my mobile, it doesnt appear to onebox*.....
*initially autocorrected to 'enema'
-
onebox*.....
*initially autocorrected to 'enema'
I want to turn this into a witty jab at Discourse, but I really like the oneboxing.
-
-
Have you tried doing this?
-
Maybe if I could see what I was doing when posting a larger URI in there with the intention of trimming it...
Anyway. As it is now:
Testing:
http://dilbert.com/fast/2014-06-02/
http://dilbert.com/strips/comic/2014-06-05/
(That one was http://dilbert.com/strips/comic/2014-06-05/)
-
Any other suggestions @riking? I'm assuming what's wanted is output similar to simply pasting the url to the originating gif, but without the hassle of trying to find it's URI.
Otherwise I see no point in whitelisting dilbert.com in this instance.
-
If a site whitelist doesn't work, then you would need to add a custom rule to the oneboxinator.
-
Oneboxinator - that is sounding like Terminator.
-
custom rule to the oneboxinator
Is there any documentation for this?
ObGoogle: Wonder how long it'll take that page to change now we've moved over to Discourse.
I'd have guessed at most 10 minutes with CS...
-
Some code changes in here: