How to use bat-draft-js-mention-plugin - 3 common examples

To help you get started, we’ve selected a few bat-draft-js-mention-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erxes / erxes / src / modules / common / components / editor / Mention.tsx View on Github external
onSearchChange = ({ value }) => {
    this.setState({
      suggestions: defaultSuggestionsFilter(
        value,
        this.props.mentions.toArray()
      )
    });
  };
github erxes / erxes / src / modules / inbox / components / conversationDetail / workarea / Editor.tsx View on Github external
onSearchChange = ({ value }) => {
    this.props.onSearchChange(value);

    this.setState({
      suggestions: defaultSuggestionsFilter(
        value,
        this.props.mentions.toArray()
      )
    });
  };
github erxes / erxes / src / modules / inbox / components / conversationDetail / workarea / Editor.tsx View on Github external
constructor(props) {
    super(props);

    this.state = {
      editorState: createStateFromHTML(
        EditorState.createEmpty(),
        props.defaultContent
      ),
      collectedMentions: [],
      suggestions: this.props.mentions.toArray(),
      templatesState: null
    };

    this.mentionPlugin = createMentionPlugin({
      mentionPrefix: '@'
    });
  }

bat-draft-js-mention-plugin

Mention Plugin for DraftJS

MIT
Latest version published 5 years ago

Package Health Score

69 / 100
Full package analysis