0.0.12 • Published 10 months ago

@kalebu2468/editor-subpoints v0.0.12

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

Heading Tool

Version of EditorJS that the plugin is compatible with

Provides SubPoints Blocks for the Editor.js.

Installation

Get the package

yarn add @kalebu2468/editorjs-subpoints

Include module at your application

import SubPoint from "@kalebu2468/editorjs-subpoints";

Usage

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

var editor = EditorJS({
  ...

  tools: {
    ...
    subpoints: SubPoints,
  },

  ...
});

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: {
    ...
    subpoints: {
      class: SubPoints,
    },
  },

  ...
});

Config Params

All properties are optional.

FieldTypeDescription
placeholderstringsubpoint's placeholder string
levelsnumber[]enabled subpoint levels
defaultLevelnumberdefault subpoint level
var editor = EditorJS({
  ...

  tools: {
    ...
    subpoints: {
      class: SubPoints,
      config: {
        placeholder: 'Enter a subpoint',
        levels: [4],
        defaultLevel: 4
      }
    }
  }

  ...
});

Tool's settings

An image showing the subpoint block tool

You can select one of six levels for heading.

Output data

FieldTypeDescription
textstringsubpoint's text
levelnumberlevel of subpoint
{
  "type": "subpoints",
  "data": {
    "text": "Why Telegram is the best messenger",
    "level": 4
  }
}
0.0.12

10 months ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.6

1 year ago

0.0.1

1 year ago