@mdit/plugin-spoiler
Plugins to hide content.
Usage
import MarkdownIt from "markdown-it";
import { spoiler } from "@mdit/plugin-spoiler";
const mdIt = MarkdownIt().use(spoiler);
mdIt.render("VuePress Theme Hope is !!powerful!!.");With the default options, you can import @mdit/plugin-spoiler/style to apply styles.
Syntax
Use !! !! hide contents.
Demo
VuePress Theme Hope is powerful.
Demo
VuePress Theme Hope is !!powerful!!.Options
export interface MarkdownItSpoilerOptions {
/**
* @default "span"
*/
tag?: string;
/**
* @default [["class", "spoiler"], ["tabindex","-1"]]
*/
attrs?: [string, string][];
}