Back to Markdown It

Syntax plugins

docs/syntax_plugins.md

15.0.01.6 KB
Original Source

Syntax plugins

Embedded (enabled by default):

Via plugins:

Manage rules

By default all rules are enabled, but can be restricted by options. On plugin load all its rules are enabled automatically.

js
import MarkdownIt from 'markdown-it'

// Activate/deactivate rules, with currying
const md = new MarkdownIt()
  .disable(['link', 'image'])
  .enable(['link'])
  .enable('image');

// Enable everything
const md = new MarkdownIt({
  html: true,
  linkify: true,
  typographer: true,
});

You can find all rules in sources: