What is markdown-it-ins?
The markdown-it-ins package is a plugin for the markdown-it Markdown parser that adds support for the <ins> HTML tag, which is used to denote inserted text. This can be useful for indicating additions or changes in a document.
What are markdown-it-ins's main functionalities?
Insertions
This feature allows you to use the ++text++ syntax in your Markdown to denote inserted text, which will be rendered as <ins>text</ins> in HTML.
const md = require('markdown-it')();
const markdownItIns = require('markdown-it-ins');
md.use(markdownItIns);
const result = md.render('++inserted text++');
console.log(result); // Outputs: <p><ins>inserted text</ins></p>
Other packages similar to markdown-it-ins
markdown-it-mark
The markdown-it-mark package is a plugin for markdown-it that adds support for the <mark> HTML tag, which is used to highlight text. While markdown-it-ins focuses on insertions, markdown-it-mark is used for highlighting text.
markdown-it-sub
The markdown-it-sub package is a plugin for markdown-it that adds support for the <sub> HTML tag, which is used to denote subscript text. This is different from markdown-it-ins, which is used for insertions.
markdown-it-sup
The markdown-it-sup package is a plugin for markdown-it that adds support for the <sup> HTML tag, which is used to denote superscript text. This is another type of text formatting that is distinct from the insertions provided by markdown-it-ins.
markdown-it-ins
<ins>
tag plugin for markdown-it markdown parser.
v2.+ requires markdown-it
v5.+, see changelog.
++inserted++
=> <ins>inserted</ins>
Markup uses the same conditions as CommonMark emphasis.
Install
node.js, browser:
npm install markdown-it-ins --save
bower install markdown-it-ins --save
Use
var md = require('markdown-it')()
.use(require('markdown-it-ins'));
md.render('++inserted++')
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as window.markdownitIns
.
License
MIT