Skip to content
Combine multiple decorators for DraftJS
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
test Initial commit May 25, 2016
.gitignore Initial commit May 25, 2016
.travis.yml Enable travis build May 25, 2016
LICENSE Initial commit May 25, 2016 Add reference to draft-js-simpledecorator Jun 10, 2016
index.js Initial commit May 25, 2016
package.json Rename into draft-js-multidecorators May 31, 2016


Build Status NPM version

Combine multiple Draft's decorators into one.


$ npm install draft-js-multidecorators


var Draft = require('draft-js');
var MultiDecorator = require('draft-js-multidecorators');

var decorator = new MultiDecorator([
    new SomeCustomDecorator(),

    // This decorator will have more priority:
    new Draft.CompositeDecorator([ ... ])

var editorState = Draft.EditorState.createEmpty(decorator)

See also

You can use SimpleDecorator to easily build decorators.

You can’t perform that action at this time.