editorjs-editable-block

0.1.0 • Public • Published

EditorJS Editable Block

Editable block tool for Editor.js.

Notes

Allows empty blocks.

Replaces built-in paragraph tool.

Based on paragraph tool.

Installation

Install via NPM

Get the package

$ npm i --save-dev editorjs-editable-block

Include module at your application

import EditableBlock from 'editorjs-editable-block';

Usage

Add a new Tool to the tools property of the Editor.js initial config.

const editor = EditorJS({
  tools: {
    paragraph: {
      class: EditableBlock,
      inlineToolbar: true,
    },
  }
});

Config Params

No config param required.

Output data

Field Type Description
text string Block's text

Data

{
  "type": "paragraph",
    "data": {
        "text": "Hello world!"
    }
}

Development

Development mode

$ yarn build:dev

Production release

  1. Create a production bundle
$ yarn build
  1. Commit dist/bundle.js

Run tests

$ yarn test

Package Sidebar

Install

npm i editorjs-editable-block

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

11.8 kB

Total Files

4

Last publish

Collaborators

  • mauriciosabogal