vidoss / slate-prism

A Slate plugin to highlight code blocks using PrismJS

Home Page:https://gitbookio.github.io/slate-prism/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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: Function(Node)] — a filtering function to select code blocks.
  • [getSyntax: Function(Node)] — a function to determine syntax for a code block.

About

A Slate plugin to highlight code blocks using PrismJS

https://gitbookio.github.io/slate-prism/

License:Apache License 2.0


Languages

Language:JavaScript 90.7%Language:HTML 6.8%Language:CSS 2.5%