0.1.0-alpha.29 • Published 11 months ago

@md-plugins/md-plugin-blockquote v0.1.0-alpha.29

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@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.

0.1.0-alpha.29

11 months ago

0.1.0-alpha.28

11 months ago

0.1.0-alpha.27

11 months ago

0.1.0-alpha.26

11 months ago

0.1.0-alpha.25

11 months ago

0.1.0-alpha.24

12 months ago

0.1.0-alpha.23

12 months ago

0.1.0-alpha.22

12 months ago

0.1.0-alpha.21

12 months ago

0.1.0-alpha.20

12 months ago

0.1.0-alpha.19

12 months ago

0.1.0-alpha.18

12 months ago

0.1.0-alpha.17

12 months ago

0.1.0-alpha.16

1 year ago

0.1.0-alpha.15

1 year ago

0.1.0-alpha.14

1 year ago

0.1.0-alpha.13

1 year ago

0.1.0-alpha.12

1 year ago

0.1.0-alpha.11

1 year ago

0.1.0-alpha.10

1 year ago

0.1.0-alpha.9

1 year ago

0.1.0-alpha.8

1 year ago

0.1.0-alpha.7

1 year ago

0.1.0-alpha.6

1 year ago

0.1.0-alpha.5

1 year ago

0.1.0-alpha.2

1 year ago

0.1.0-alpha.1

1 year ago