Skip to content
On this page

Superscript

A very small characters just above the line of text.

Usage

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

js
import { Superscript } from "@ageesea/text-toolkit"

let editor = EditorJS({
  ...

  tools: {
    ...
    superscript: Superscript,
  }

  ...
});

Config Params

The Superscript Tool supports these configuration parameters:

FieldTypeDescription
textClassstringThe custom class for superscript.

Output Data

Superscript text will be wrapped with a sup tag with a text class if provided in config.

FieldTypeDescription
textstringparagraph's text
json
{
  "type" : "paragraph",
  "data" : {
    "text" : "x<sup>2</sup>",
  }
}

Released under the MIT License