0.0.16 • Published 9 months ago

@kalebu2468/editorjs-points v0.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

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.

FieldTypeDescription
placeholderstringpoint's placeholder string
levelsnumber[]enabled point levels
defaultLevelnumberdefault 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

FieldTypeDescription
textstringpoint's text
levelnumberlevel of point
{
  "type": "points",
  "data": {
    "text": "Why Telegram is the best messenger",
    "level": 3
  }
}
0.0.15

9 months ago

0.0.16

9 months ago

0.0.14

12 months ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.1

1 year ago