Skip to content

mattmazzola/slate-mention-editor

Repository files navigation

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

About

React Component built on Slate.js to facilitate mention ability on comment systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published