@kalebu2468/editorjs-points

0.0.13 • Public • Published

Point Tool

Version of EditorJS that the plugin is compatible with

Provides Points Blocks for the Editor.js.

Installation

Get the package

yarn add @kalebu2468/editorjs-points

Include module at your application

import Point from "@kalebu2468/editorjs-points";

Optionally, you can load this tool from CDN JsDelivr CDN

Usage

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

var editor = EditorJS({
  ...

  tools: {
    ...
    points: Point,
  },

  ...
});

Shortcut

You can insert this Block by a useful shortcut. Set it up with the tools[].shortcut property of the Editor's initial config.

var editor = EditorJS({
  ...

  tools: {
    ...
    points: {
      class: Point,
    },
  },

  ...
});

Config Params

All properties are optional.

Field Type Description
placeholder string point's placeholder string
levels number[] enabled point levels
defaultLevel number default point level
var editor = EditorJS({
  ...

  tools: {
    ...
    points: {
      class: Point,
      config: {
        placeholder: 'Enter a point',
        levels: [3],
        defaultLevel: 3
      }
    }
  }

  ...
});

Tool's settings

An image showing the point block tool

You can select one of six levels for point.

Output data

Field Type Description
text string point's text
level number level of point
{
  "type": "points",
  "data": {
    "text": "Why Telegram is the best messenger",
    "level": 3
  }
}

Package Sidebar

Install

npm i @kalebu2468/editorjs-points

Weekly Downloads

19

Version

0.0.13

License

MIT

Unpacked Size

25.1 kB

Total Files

5

Last publish

Collaborators

  • kalebu2468