Skip to content
A Slate plugin to highlight code blocks using PrismJS
Branch: master
Clone or download
Pull request Compare This branch is even with GitbookIO:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
lib
.babelrc
.eslintignore
.eslintrc
.flowconfig
.gitignore
.npmignore
CHANGELOG.md
LICENSE
README.md
package.json
yarn.lock

README.md

⚠️ 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

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.
You can’t perform that action at this time.