1.0.2 • Published 8 years ago

draftjs-prism v1.0.2

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
8 years ago

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

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago