hedgedoc/docs/content/references/hfm.md
Philip Molares f78b857aef
Docs: Add footnotes extension
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-03-28 20:24:45 +02:00

7.6 KiB

HedgeDoc Flavored Markdown

HedgeDoc has its own markdown dialect which supports many features from CommonMark and Github Flavored Markdown. It also adds some new extensions and is missing some.

These tables tell you what exactly we support in HedgeDoc 1.x (HFM 1) and HedgeDoc 2 (HFM 2).

Typography

Feature HFM 1 HFM 2 CommonMark GFM
bold ☑️ ☑️ ☑️ ☑️
italic ☑️ ☑️ ☑️ ☑️
underline ☑️ ☑️ (☑️ with <ins>) (☑️ with <ins>)
strikethrough ☑️ ☑️ (☑️ with <del>) ☑️
subscript ☑️ ☑️ (☑️ with <sub>) (☑️ with <sub>)
superscript ☑️ ☑️ (☑️ with <sup>) (☑️ with <sup>)
marked ☑️ ☑️ (☑️ with <mark>) (☑️ with <mark>)

Extended typography features

Feature HFM 1 HFM 2 CommonMark GFM
heading ☑️ ☑️ ☑️ ☑️
inline code ☑️ ☑️ ☑️ ☑️
indented code blocks ☑️ ☑️ ☑️ ☑️
code block with language1 ☑️ ☑️ ☑️ ☑️
code block with extra features2 ☑️ ☑️
block quote ☑️ ☑️ ☑️ ☑️
name tag ([name=...]) (☑️)3 ☑️
time tag ([time=...]) (☑️)3 ☑️
color tag ([color=...]) (☑️)3 ☑️
unorderd list ☑️ ☑️ ☑️ ☑️
ordered list ☑️ ☑️ ☑️ ☑️
task list ☑️ ☑️ ☑️
defition list ☑️ ☑️
emoji Unicode 6.1 Unicode 13
ForkAwesome ☑️ with <i class='fa'> ☑️ with shortcodes
LaTeX ☑️4 ☑️5
Feature HFM 1 HFM 2 CommonMark GFM
link ☑️ ☑️ ☑️ ☑️
link reference ☑️ ☑️ ☑️ ☑️
link title ☑️ ☑️ ☑️ ☑️
autolink with <> ☑️ ☑️ ☑️ ☑️
autolink without <> ☑️ ☑️ ☑️
footnotes ☑️ ☑️
image ☑️ ☑️ ☑️ ☑️
image with given size ☑️ ☑️ (☑️ with <img>) (☑️ with <img>)
table of contents ☑️ ☑️

Structural elements

Feature HFM 1 HFM 2 CommonMark GFM
table ☑️ ☑️ (☑️ with <table>) ☑️
horizontal line ☑️ ☑️ ☑️ ☑️
collapsable block (☑️ with <details>) ☑️ (☑️ with <details>) (☑️ with <details>)
Alerts ☑️ ☑️

Embeddings

HFM 1 includes support for certain embeddings of external content by using the {%keyword parameter %} syntax. To increase the readability of the markdown code we decided that HFM 2 should just use plain links if possible.

Feature HFM 1 HFM 2 CommonMark GFM
PDF ({%pdf ... %}) ☑️ removed
YouTube ({%youtube ... %}) ☑️ with plain link6
Vimeo ({%vimeo ... %}) ☑️ with plain link6
Slideshare ({%slideshare ... %}) ☑️ removed
Speakerdeck ({%speakerdeck ... %}) ☑️ removed
GitHub Gist ({%gist ... %}) ☑️ with plain link6

HTML

Besides the basic HTML typography elements (<p>, <a>, <b>, <ins>, <del>) the following more special HTML elements are supported by some specification.

Feature HedgeDocMark 1 HedgeDocMark 2 CommonMark GFM
<title> ☑️
<textarea> ☑️ ☑️
<style> ☑️ ☑️ ☑️
<xmp> ☑️
<iframe> ☑️ ☑️ ☑️
<noembed> ☑️ ☑️
<noframes> ☑️ ☑️
<script> ☑️
<plaintext> ☑️ ☑️

  1. Code blocks with a given language are rendered using syntax highlighting. ↩︎

  2. Several special "language" keywords can be used for rendering diagrams, charts, etc. ↩︎

  3. Use of these tags is only supported within blockquotes and (un)ordered lists. ↩︎

  4. LaTeX is rendered with MathJax. ↩︎

  5. LaTeX is rendered with KaTeX. ↩︎

  6. The special syntax from HFM 1 is deprecated, but will still work in HFM 2. However, a plain link to the content should be used. ↩︎