All Projects → GitbookIO → slate-prism

GitbookIO / slate-prism

Licence: Apache-2.0 License
A Slate plugin to highlight code blocks using PrismJS

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

⚠️ 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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].