attachEvent

function attachEvent(eventName: string = null, callback: () = null): void

Description

Subscribes to the specified event and calls the callback function when the event fires.

Parameters

eventNamestringdefault: null

The event name.

callback()default: null

Function to be called when the event fires.

Returns

void

Try It

Api.attachEvent("asc_onHyperlinkClick", function() {
   console.log("HYPERLINK!!!");
});

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).