nizel-plugin-details
v0.1.10
Published
Details disclosure block plugin for Nizel.
Readme
nizel-plugin-details
Disclosure block support for Nizel.
The plugin converts :::details fenced blocks into Nizel custom blocks and renders them as native HTML <details> / <summary> markup.
The browser build exposes NizelDetails from dist/details.iife.js.
Install
npm install nizel-plugin-detailsUsage
import { useNizel } from 'nizel';
import { detailsPlugin } from 'nizel-plugin-details';
const nizel = useNizel({
plugins: [detailsPlugin()],
});Syntax
:::details Click to expand
Hidden **Markdown** content.
- Nested content works
:::If no summary is supplied, the plugin uses Details.
Options
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| className | string | 'details' | CSS class for the generated <details> element. |
Output
<details class="details"><summary>Click to expand</summary>...</details>License
MIT
