Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1010 Bytes

File metadata and controls

44 lines (30 loc) · 1010 Bytes
sidebar_label api.detach()
title detach Method
description You can learn about the on method in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText.

api.detach()

Description

@short: 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