0.0.17 • Published 30 days ago

@kalebu2468/editorjs-topic v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
30 days ago

Topic Tool

Version of EditorJS that the plugin is compatible with

Provides Topic Blocks for the Editor.js.

Installation

Get the package

yarn add @kalebu2468/editorjs-topic

Include module at your application

import Topic from "@editorjs/editorjs-topic";

Usage

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

var editor = EditorJS({
  ...

  tools: {
    ...
    topics: Topics,
  },

  ...
});

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: {
    ...
    topics: {
      class: Topics,
    },
  },

  ...
});

Config Params

All properties are optional.

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

  tools: {
    ...
    topics: {
     class: Topics,
        config: {
          placeholder: "Enter a Topic",
          levels: [1],
          defaultLevel: 1,
        },
    }
  }

  ...
});

Output data

FieldTypeDescription
textstringtopic's text
levelnumberlevel of topic
{
  "type": "topic",
  "data": {
    "text": "Why Telegram is the best messenger",
    "level": 1
  }
}
0.0.17

30 days ago

0.0.13

1 month ago

0.0.14

1 month ago

0.0.15

1 month ago

0.0.16

1 month ago

0.0.12

1 month ago

0.0.11

1 month ago

0.0.10

2 months ago

0.0.9

2 months ago

0.0.8

2 months ago

0.0.7

2 months ago

0.0.6

2 months ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago