slate-prism

0.5.0 • Public • Published

slate-prism

NPM version

A Slate plugin to highlight code blocks using PrismJS

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

Package Sidebar

Install

npm i slate-prism

Weekly Downloads

141

Version

0.5.0

License

Apache-2.0

Unpacked Size

1.83 MB

Total Files

20

Last publish

Collaborators

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