0.1.0 • Published 7 years ago

slate-mention-editor v0.1.0

Weekly downloads
20
License
-
Repository
-
Last release
7 years ago

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