@qnighy/draft-js-multidecorators

    1.1.0 • Public • Published

    draft-js-multidecorators

    Build Status NPM version

    Combine multiple Draft's decorators into one.

    Installation

    $ npm install @qnighy/draft-js-multidecorators
    

    Usage

    var Draft = require('draft-js');
    var MultiDecorator = require('@qnighy/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.

    Keywords

    Install

    npm i @qnighy/draft-js-multidecorators

    DownloadsWeekly Downloads

    549

    Version

    1.1.0

    License

    Apache-2.0

    Unpacked Size

    18.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • qnighy