JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16178
  • Score
    100M100P100Q131260F
  • License MIT

The unofficial editor-js component for React

Package Exports

  • react-editor-js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-editor-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-editor-js

The unofficial editor-js component for React

Getting Started

Install via npm (or yarn)

npm install --save-dev react-editor-js

Usage

import EditorJs from 'react-editor-js';

<EditorJs data={data} />;

API

Allow all options of editor-js

Name Type Description
enableReInitialize Boolean editor-js rerendering when componentDidUpdate

How to access editor-js instance?

You can access using instanceRef

async handleSave() {
  await this.editorInstance.save();
}

componentDidMount() {
  this.editorInstance // access editor-js
}

render() {
  return <EditorJs instanceRef={instance => this.editorInstance = instance} data={data} />
}