draft-js-multidecorators

Combine multiple decorators for DraftJS

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
draft-js-multidecorators
1.0.06 years ago6 years agoMinified + gzip package size for draft-js-multidecorators in KB

Readme

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)