@draft-js-enhance-plugins/markdown-convert
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

DraftJS Markdown Convert Plugin

This is a plugin for the @draft-js-plugins/editor.

Feature

Markdown syntax shortcuts supported.

TODO

  • [ ] Support links syntax
  • [ ] Support images syntax

Usage

import { EditorState } from 'draft-js';
import Editor from '@draft-js-plugins/editor';
import createMarkdownConvertPlugin from '@draft-js-enhance-plugins/markdown-convert';

const markdownConvertPlugin = createMarkdownConvertPlugin();

const plugins = [markdownConvertPlugin];

function Example() {
  const [editorState, setEditorState] = useState(EditorState.createEmpty());

  return (
    <Editor
      editorState={editorState}
      onChange={setEditorState}
      plugins={plugins}
    />
  );
}

Package Sidebar

Install

npm i @draft-js-enhance-plugins/markdown-convert

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

22.1 kB

Total Files

8

Last publish

Collaborators

  • varieget