JSPM

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

Point Tool for Editor.js

Package Exports

  • @kalebu2468/editorjs-points

Readme

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
  }
}