JSPM

  • Created
  • Published
  • Downloads 4853
  • Score
    100M100P100Q125419F
  • License MIT

Emoji Plugin for DraftJS

Package Exports

  • draft-js-emoji-plugin
  • draft-js-emoji-plugin/lib/plugin.css

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (draft-js-emoji-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

DraftJS Emoji Plugin

This is a plugin for the draft-js-plugins-editor.

This plugin highlights hashtags in the text!

Usage

import createEmojiPlugin from 'draft-js-emoji-plugin';

const emojiPlugin = createEmojiPlugin();

Importing the default styles

The plugin ships with a default styling available at this location in the installed package: node_modules/draft-js-emoji-plugin/lib/plugin.css.

Webpack Usage

You can import the css file by using the style-loader and css-loader. For example you can add this to your webpack config:

module: {
  loaders: [{
    test: /\.css$/,
    loaders: [
      'style', 'css'
    ]
  }]
}

and then import the styles:

import 'draft-js-emoji-plugin/lib/plugin.css';

Browserify Usage

TODO: PR welcome