insert-list
Description
Fires when inserting list
Usage
"insert-list": ({ type: TListType }) => boolean | void;
type TListType = "bulleted" | "numbered";
Parameters
The callback of the insert-list event can take an object with the following parameter:
type
- the type of the inserted list. You can specify the following values:"bulleted"
- bulleted list"numbered"
- numbered list
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 "insert-list" event
editor.api.on("insert-list", (obj) => {
console.log(obj.type);
console.log("The list was inserted");
});
Change log: The event was added in v2.0