Skip to main content

clear-text-format

Description

Fires when a text format is cleared via the menubar/toolbar or Event Bus methods

Usage

"clear-text-format": () => 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 "clear-text-format" event
editor.api.on("clear-text-format", () => {
console.log("Text format was cleared");
});
// clear text format
editor.api.exec("clear-text-format", {});

Change log: The event was added in v2.0