1.0.2 • Published 10 years ago
draftjs-prism v1.0.2
draftjs-prism
draftjs-prism is a decorator for DraftJS to highlight code blocks using Prism.

Installation
$ npm install draftjs-prismUsage
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