draftjs-prism

1.0.2 • Public • Published

draftjs-prism

NPM version

draftjs-prism is a decorator for DraftJS to highlight code blocks using Prism.

Prism

Installation

$ npm install draftjs-prism

Usage

var Draft = require('draft-js');
var PrismDecorator = require('draftjs-prism');

var decorator = new PrismDecorator();
var editorState = Draft.EditorState.createEmpty(decorator)

You'll also need to include the css for one of the Prism themes.

You can use this decorator combined with others by using draftjs-multidecorators

Readme

Keywords

Package Sidebar

Install

npm i draftjs-prism

Weekly Downloads

2

Version

1.0.2

License

Apache-2.0

Last publish

Collaborators

  • samypesse