New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@md-plugins/md-plugin-blockquote

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@md-plugins/md-plugin-blockquote

A markdown-it plugin for Blockquotes with custom styles.

0.1.0-alpha.29
latest
Source
npm
Version published
Weekly downloads
16
-30.43%
Maintainers
0
Weekly downloads
 
Created
Source

@md-plugins/md-plugin-blockquote

A Markdown-It plugin that enhances blockquote rendering by adding customizable CSS classes. This allows for easier styling and alignment with design systems, enabling more visually appealing and consistent blockquote presentation.

Features

  • Adds customizable CSS classes to <blockquote> elements.
  • Supports a default class that can be overridden via plugin options.

Installation

Install the plugin via your preferred package manager:

# with pnpm:
pnpm add @md-plugins/md-plugin-blockquote
# with Yarn:
yarn add @md-plugins/md-plugin-blockquote
# with npm:
npm install @md-plugins/md-plugin-blockquote

Usage

Basic Setup

import MarkdownIt from 'markdown-it'
import { blockquotePlugin } from 'md-plugin-blockquote'

const md = new MarkdownIt()
md.use(blockquotePlugin, {
  blockquoteClass: 'custom-blockquote',
})

const markdownContent = `
> This is a blockquote.
`

const renderedOutput = md.render(markdownContent)

console.log('Rendered Output:', renderedOutput)

Example Output

The rendered output will include the specified CSS class:

<blockquote class="custom-blockquote">
  <p>This is a blockquote.</p>
</blockquote>

Options

The md-plugin-blockquote plugin supports the following options:

OptionTypeDefaultDescription
blockquoteClassstring'markdown-blockquote'CSS class to apply to blockquotes.

Testing

To run the tests, use the following command:

pnpm test

Documentation

In case this README falls out of date, please refer to the documentation for the latest information.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Keywords

markdown-it

FAQs

Package last updated on 13 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts