Skip to content
Combine multiple decorators for DraftJS
JavaScript
Branch: master
Clone or download
Permalink
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
README.md 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

README.md

draft-js-multidecorators

Build Status NPM version

Combine multiple Draft's decorators into one.

Installation

$ npm install draft-js-multidecorators

Usage

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.