@mdit/plugin-align
Plugin to align contents.
Note
This plugin is based on .
Usage
import MarkdownIt from "markdown-it";
import { align } from "@mdit/plugin-align";
const mdIt = MarkdownIt().use(align);
mdIt.render(`\
::: center
Contents to align center
:::
`);Syntax
::: left
Contents to align left
:::
::: center
Contents to align center
:::
::: right
Contents to align right
:::
::: justify
Contents to align justify
:::Nesting and escaping
Nestings can be done by increasing marker number of outer container:
:::: center Center contents... ::: left Left contents.. ::: Center contents... ::::will be
Center contents...
Left contents..
Center contents...
Escaping can be done by adding
\to escape the marker:\::: left :::will be
::: left
:::