Skip to main content

superscript

Description

Fires when pressing the "Superscript" button in the menubar/toolbar or via Event Bus methods

Usage

"superscript": () => boolean | void;
info

For handling inner events you can use Event Bus methods

Example

// initialize RichText
const editor = new richtext.Richtext("#root", {
// configuration properties
});
// subscribe to the "superscript" event
editor.api.on("superscript", () => {
console.log("Superscript was applied");
});
// trigger the "superscript" event
editor.api.exec("superscript", {});

Change log: The event was added in v2.0