⚠️ This repository is archived and has moved to 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
A Slate plugin to highlight code blocks using PrismJS
npm install slate-prism
import Prism from 'slate-prism'
const plugins = [
Prism()
]
Note: You have to add a Prism theme CSS to your application.
[onlyIn: (Node) => boolean]
— a filtering function to select code blocks.[getSyntax: (Node) => string]
— a function to determine syntax for a code block.