markdown-it-footnote
Footnotes plugin for markdown-it markdown parser.
v2.+ requires markdown-it
v5.+, see changelog.
Markup is based on pandoc definition.
Normal footnote:
Here is a footnote reference,[^1] and another.[^longnote]
[^1]: Here is the footnote.
[^longnote]: Here's one with multiple blocks.
Subsequent paragraphs are indented to show that they
belong to the previous footnote.
html:
Here is a footnote reference,[1] and another.[2]This paragraph won’t be part of the note, because itisn’t indented.Here is the footnote. ↩Here’s one with multiple blocks.Subsequent paragraphs are indented to show that theybelong to the previous footnote. ↩
Inline footnote:
Here is an inline note.^[Inlines notes are easier to write, since
you don't have to pick an identifier and move down to type the
note.]
html:
Here is an inline note.[1]Inlines notes are easier to write, sinceyou don’t have to pick an identifier and move down to type thenote. ↩
Install
node.js, browser:
npm install markdown-it-footnote --savebower install markdown-it-footnote --save
Use
var md = ; md // See examples above
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownitFootnote
.