slate-mention-editor
v0.1.0
Published
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](slate.js)
Downloads
7
Readme
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/