@gitbook/slate-prism
TypeScript icon, indicating that this package has built-in type declarations

4.1.3 • Public • Published

slate-prism

NPM version

A Slate plugin to highlight code blocks using PrismJS

⚠️ This repository is now using GitBook's fork of ianstormtaylor/slate. Previous versions are still available on NPM All the versions using GitBook's fork of slate are now published under the @gitbook NPM scope. To learn more about why we forked Slate, read our manifest

Install

npm install slate-prism

Simple Usage

import Prism from 'slate-prism'

const plugins = [Prism()]

Note: You have to add a Prism theme CSS to your application.

Arguments

  • [onlyIn: (Node) => boolean] — a filtering function to select code blocks.
  • [getSyntax: (Node) => string] — a function to determine syntax for a code block.

Readme

Keywords

none

Package Sidebar

Install

npm i @gitbook/slate-prism

Weekly Downloads

14

Version

4.1.3

License

MIT

Unpacked Size

30.9 kB

Total Files

16

Last publish

Collaborators

  • taranvohra
  • gitbook-bot
  • samypesse
  • jpreynat
  • emmerich