api.detach()
Description
Allows removing/detaching event handlers
Usage
api.detach( tag: string ): void;
Parameters
tag
- (required) the name of the action tag
Events
info
The full list of RichText internal events can be found here
Example
// initialize RichText
const editor = new richtext.Richtext("#root", {
// configuration properties
});
editor.api.on("set-font-size", (obj) => {
console.log(obj.fontSize);
}, { tag: "track" });
editor.api.detach("track");
Change log: The method was updated in v2.0. The name
and context
parameters were removed