Skip to main content

update-link

Description

Fires when updating link

Usage

"update-link": ({ id: number, url: string }) => boolean | void;

Parameters

The callback of the update-link event can take an object with the following parameters:

  • id - the link ID
  • url - the modified url
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 "update-link" event
editor.api.on("update-link", (obj) => {
console.log(obj);
console.log("The following link was updated:" + obj.url);
});

Change log: The event was added in v2.0