Skip to content

SamyPesse/draft-js-multidecorators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Combine multiple decorators for DraftJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published