Markdown-input
Markdown should be a way to enter questions and answers, as it is easier to write
Bold text
than it is to write
<b>Bold text</b>
and it's easier to write
* Blub
* Bli
* Bla
than it is to write
<ul>
<li>Blub</li>
<li>Bli</li>
<li>Bla</li>
</ul>
Already implemented:
-
M commented
Hi, I' already using the fast-format-plugin, it's a very good help, but it features only a very very small subset of Markdown:
It converts *bold* to <strong>bold</strong> and allows italics, but Fast-format does not feature
- Links "[This link](http://example.net/)"
- Unordered Lists "* item"
- Ordered Lists "1. item"
- Code-blocks ``function blub(){ }``
- Images "!(filename.png)"
- Tables "ID | Name | Age"But.... after I posted this feature request, I found the configuration-options of Fast Format and I think I'm able to get a few more Markdown-features by adding own regexps there.
Links (remove rule "gray" first!)
Rule: ([^\\]|^)(\[.*?[^\\]\])\((.*?[^\\])\)
Repl: \1<a href="\2">\3</a>
Usage: [This link](http://example.net/)Images
Rule: ([^\\]|^)!\((.*?[^\\])\)
Repl: \1<img src="\2" alt="">
Usage: !(filename.png)Code
Rule: ([^\\]|^)``(.*?[^\\])``
Repl: \1<code>\2</code>
Usage: ``var blub = 1;``The regexps might need some more testing...
Does anyone know how to get from
* abc
* def
- ghi
to
<ul><li>abc</li><li>def</li><li>ghi</li></ul>?Or from
1. abc
4. def
3. ghi
to
<ol><li>abc</li><li>def</li><li>ghi</li></ol>?I do not. :(
Same for tables...
Best regards!
PS: What is ([^\\]|^) for?
Rule: ``(.*?[^\\])``
Repl: <code>\1</code>
Works for me, too. -
M commented
There are also extended Markdown "flavors", that allow tables:
https://help.github.com/articles/github-flavored-markdown/
https://confluence.atlassian.com/display/STASH/Markdown+syntax+guide