set-line-height
Description
Fires when setting a line height
Usage
"set-line-height": ({ lineHeight: string }) => boolean | void;
Parameters
The callback of the set-line-height event can take an object with the following parameter:
lineHeight
- a line height
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 "set-line-height" event
editor.api.on("set-line-height", (obj) => {
console.log(obj);
console.log("The line height was changed");
});
// apply a new line height
editor.api.exec("set-line-height", {
lineHeight: "15px"
});
Change log: The event was added in v2.0