0.0.18 • Published 9 months ago

@kalebu2468/editorjs-topic v0.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months 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.18

9 months ago

0.0.17

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.12

1 year 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.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago