Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 905 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 905 Bytes

Slate Mention Editor

What is it?

React component to help insert a special known word while typing a message. Simiar to the [https://www.draft-js-plugins.com/plugin/mention](mention plugin) written for draft.js, this is more flexible and built on https://www.slatejs.org

Getting Started

Install

npm i slate-mention-editor

Import

import { SlateMentionEditor } from 'slate-mention-editor'

Declare

<SlateMentionEditor
  placeholder="Enter some text..."
  options={this.state.options}
  value={this.state.value}
  disabled={this.state.readOnly}
  onChange={this.onChange}
  onSubmit={this.onSubmit}
/>

Demo

https://mattmazzola.github.io/slate-mention-editor/

Source

https://github.com/mattmazzola/slate-mention-editor