I tried to get the mention plugin in js project to work with Browserify. This is due to the fact that our application is built using Browserify.
About this plugin: https://www.draft-js-plugins.com/plugin/mention
In the examples, they use Webpack, and they use import.
I am using require. So, an example of my code:
var React = require('react'), Draft = require('draft-js'), Immutable = require('immutable'), Editor = require('draft-js-plugins-editor'), Mention = require('draft-js-mention-plugin'); var mentionPlugin = Mention.createMentionPlugin(); var MentionSuggestions = mentionPlugin.MentionSuggestions; var plugins = [mentionPlugin]; var Editor = React.createClass({
I do not use ES6 notation. Does anyone know what I'm doing wrong?
source share