A collection of plug-ins that extend the Markdown-it parser

Overview

markdown-it-plugins NPM version

A collection of plug-ins that extend the Markdown-it parser.

Install

npm i markdown-it-plugins -D

Usage

import MarkdownIt from 'markdown-it'
import { noticeboard } from 'markdown-it-plugin'

const markdown = new Markdown({
  // ...
})
  .use(noticeboard)

Plugins

container

Use Vue.js style content blocks to present your message.

import { container } from 'markdown-it-plugins'
// preset styles
import 'markdown-it-plugins/container.css'

markdown.use(container)

example

Optional values: [ details | tip | danger | warning ] container

TIP:

:::  [title]
  content message
:::
::: details title message
message
:::

::: tip spoiler
message
:::

::: danger spoiler
message
:::

::: warning spoiler
message
:::

noticeboard

A lightweight prompt box containing only tip and Danger types.

import { noticeboard } from 'markdown-it-plugins'
import 'markdown-it-plugins/noticeboard.css'

markdown.use(noticeboard)

example

noticeboard

?> This is tip.
!> This is danger.

collectBlockCode

To add foldable functionality to a code block, you can also give it a code block name.

import {
  // TypeScript
  type CollectBlockCode,
  collectBlockCode,
} from 'markdown-it-plugins'
import 'markdown-it-plugins/collect-block-code.css'

markdown.use(collectBlockCode, options)
// TypeScript
markdown.use<CollectBlockCode>(collectBlockCode, options)

options

interface CollectCodeBlock {
  /**
   * Show the code block language.
   * @type {boolean}
   * @default true
   */
  lang?: boolean

  /**
   * Shows the copy code block content button.
   * @type {boolean}
   * @default false
   */
  copy?: boolean

  /**
   * Copy the content button text.
   * @type {string}
   * @default: 'Copy'
   */
  copyText?: string

  /**
   * The delimiter for the code block name.
   * @type {string}
   * @default ':'
   */
  separator?: string

  /**
   * Display code block names.
   * @type {boolean}
   * @default false
   */
  blockName?: boolean

  /**
   * Always expand the code block.
   * @type {boolean}
   * @default true
   */
  alwaysOpen?: boolean
}

example

collect-block-code

```js : block name
const a = 1
const b = 2
const c = 3

console.log(a, b, c)
```

extendImageTitle

Set additional properties at the position of the image's title parameter.

import { extendImageTitle } from 'markdown-it-plugins'

markdown.use(extendImageTitle)

example

extend-image-title

![alt_text](image_url 'width=300px&height=100px&style=border:3px solid #f00;')

codeLineNumbers

Add a line count display to your code block.(Need to register before other plugins!, The final effect may vary depending on your style)

import { codeLineNumbers } from 'markdown-it-plugins'
import 'markdown-it-plugins/code-line-numbers.scss'

markdown.use(extendImageTitle)

example

You might also like...

Simple and Extensible Markdown Parser for Svelte, however its simplicity can be extended to any framework.

svelte-simple-markdown This is a fork of Simple-Markdown, modified to target Svelte, however due to separating the parsing and outputting steps, it ca

May 22, 2022

🦾 Tiny 2kb Markdown parser written, almost as fast and smart as Tony Stark

Starkdown 🦾 Starkdown is a Tiny 2kb Markdown parser written, almost as fast and smart as Tony Stark. npm i starkdown Motivation It is a continuation

Sep 22, 2022

基于React开发的新一代web调试工具,支持React组件调试,类似于Chrome Devtools。A Lightweight, Easy To Extend Web Debugging Tool Build With React

基于React开发的新一代web调试工具,支持React组件调试,类似于Chrome Devtools。A Lightweight, Easy To Extend Web Debugging Tool Build With React

English | 简体中文 基于React开发的移动web调试工具 更新日志 简单易用 功能全面 易扩展 高性能 使用cdn方式,一键接入 类Chrome devtools, 内嵌React开发者工具,支持日志,网络,元素,代理,存储,性能等, 具有更好的网络捕获能力和丰富的日志展现形式 暴露内部

Dec 25, 2022

Extend GitHub pages with support for LaTeX, plotly, etc.

Extend GitHub pages with support for LaTeX, plotly, etc. xhub is a browser extension for Google Chrome that lets you use various add-ons on GitHub REA

Dec 11, 2022

🧱 Easily extend native three.js materials with modular and composable shader units and effects

🧱 Easily extend native three.js materials with modular and composable shader units and effects

three-extended-material Easily extend native three.js materials with modular and composable shader units and effects. Usage npm install three-extended

Dec 2, 2022

📦 Alpine JS plugin to extend the functionality of the official $persist plugin

Alpine JS Persist Extended Alpine JS magic method $storage extends the official $persist plugin to help you work with local storage 📦 Example 👀 div

Dec 28, 2022

Avatar classes to extend Bootstrap 5.

Avatar classes to extend Bootstrap 5.

Bootstrap Avatar A collection of fixed and responsive CSS for styling avatars. Demo https://ghoststead.github.io/bootstrap-avatar Installation jsDeliv

May 22, 2022

Minimalistic configuration for TS to only extend JS with types. No TS features, no bundling. Readable maintainable code after compilation.

Minimalistic configuration for TS to only extend JS with types. No TS features, no bundling. Readable maintainable code after compilation.

ts-guideline Minimalistic configuration for TS to only extend JS with types. No TS-scpecific features, no bundling. Readable maintainable code after c

Dec 22, 2022

Forked from hayes0724/shopify-packer Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, compatible with Slate and existing websites.

Forked from hayes0724/shopify-packer Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, compatible with Slate and existing websites.

Shopify Packer Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, comes with starter themes and com

Nov 24, 2022

Text Neon Golden effect jQuery plug-in

novacancy.js novacancy.js is a text neon golden effect jQuery plugin. Demo Visit demo site Basic Usage Just use $('#no').novacancy(); or detail $('#no

Sep 24, 2022

Plug is a browser extension for users of the Internet Computer that allows you to access your ICP, Cycles, and other tokens as well as log into IC apps with one click.

Plug is a browser extension for users of the Internet Computer that allows you to access your ICP, Cycles, and other tokens as well as log into IC apps with one click.

Plug Introduction Welcome to Plug! An Internet Computer crypto wallet and authentication provider as a browser extension. Find our latest version in t

Dec 23, 2022

Plug-in for Obsidian.md which will create Notes from JSON files

Import JSON This plug-in provides you with the tools to import your favourite JSON tables. A magnifying-glass icon will appear in the left margin when

Dec 31, 2022

Write and read comments on every page with a simple plug-in for your browser

Write and read comments on every page with a simple plug-in for your browser

Licom - comments on every webpage Licom is a simple plugin for your browser that adds the feature to leave comments on every page, even if it doesn't

Aug 4, 2022

A lightweight tooltip plug-in library

popper-next 是一款轻量的 Tooltip 插件 vue、react安装使用 推荐yarn yarn add popper-next 或者 cnpm install popper-next -S 在html页面中如何使用 script src="https://unpkg.com/pop

Dec 7, 2022

Robust, plug & play generator for Bootstrap toasts.

Bootstrap Toaster Robust, plug & play generator for Bootstrap toasts. Supports Bootstrap 4 and Bootstrap 5. Demo A demo page is available at bootstrap

Dec 21, 2022

A jQuery plug-in to notify you of CSS, Attribute or Property changes in an element

selectWatch.js jQuery plug-in gives an opportunity to monitor changes of DOM element's CSS styles, attributes, properties, input element or select ele

Oct 28, 2022

Plug-and-play, faster-than-native promise/callback event emitter

Plug-and-play, faster-than-native promise/callback event emitter

kNow Blazing-fast callback/promise-based events with a tiny footprint What is this? With kNow (pronounced "now"—the k's silent), JavaScript event mana

Sep 11, 2022

A jQuery Plug-in to select the time with a clock inspired by the Android time picker.

A jQuery Plug-in to select the time with a clock inspired by the Android time picker.

Clock Timepicker Plugin for jQuery See a demo here A free jQuery Plug-in to select the time with a clock inspired by the Android time picker. This plu

Dec 22, 2022

Markdown Plus is a markdown editor with extra features

Markdown Plus is a markdown editor with extra features

Markdown Plus Markdown Plus ("M+" or "mdp" for short) is a markdown editor with extra features. Online demo: mdp.tylingsoft.com Apps We currently don'

Dec 29, 2022
Releases(v0.1.4)
Owner
Chestnut
Everyone is changed, but very few truly affect others.
Chestnut
Web based, client side markdown editor with live previews

markdown.doctor (md) editor Web based, client side markdown editor with live previews I was looking for a nice markdown editor, and I couldn't find on

rasengan 4 Feb 24, 2022
Take your boring markdown document and add some columns to it

Take your boring markdown document and add some columns to it! With Multi Column Markdown rather than limiting your document layout to a single linear file you can now define blocks of data to be layed out horizontally next to each other. This additional functionality gives you the freedom to structure your notes in more creative ways.

Cameron Robinson 91 Jan 2, 2023
WebNote is a simple, plain-text note-taking app for the web with Markdown support.

WebNote is a simple, plain-text note-taking app for the web with Markdown support. What you see is what you paste. No WYSIWIG, no formatting pasted from the web, and no features you don't need or want.

Ivan Kuznietsov 3 Feb 7, 2022
Vite plugin to convert markdown to html with front-matter extraction and build-time syntax highlighting

Vite plugin to convert markdown to html with front-matter extraction and build-time syntax highlighting

Saurabh Daware 9 Sep 18, 2022
Convert a well formed GitHub Issue Form populated Markdown body into a JSON data file in the repository

Convert a well formed GitHub Issue Form populated Markdown body into a JSON data file in the repository

Zach Leatherman 16 Sep 28, 2022
⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

⚡️Blitz 12.5k Jan 4, 2023
A Hackable Markdown Note Application for Programmers. Version control, AI completion, mind map, documents encryption, code snippet running, integrated terminal, chart embedding, HTML applets, plug-in, and macro replacement.

Yank Note A hackable markdown note application for programmers Download | Try it Online >>> Not ecommended English | 中文说明 [toc]{level: [2]} Highlights

洋子 4.3k Dec 31, 2022
Json-parser - A parser for json-objects without dependencies

Json Parser This is a experimental tool that I create for educational purposes, it's based in the jq works With this tool you can parse json-like stri

Gabriel Guerra 1 Jan 3, 2022
A markdown parser and compiler. Built for speed.

Marked ⚡ built for speed ⬇️ low-level compiler for parsing markdown without caching or blocking for long periods of time ⚖️ light-weight while impleme

Marked 28.9k Jan 7, 2023