attachEvent

function attachEvent(id: string, action: ()): void

Description

Defines the method to add an event listener, a function that will be called whenever the specified event is delivered to the target. The list of all the available events can be found {@link /plugin/events here}.

Parameters

idstring

The event name.

action()

The event listener.

Returns

void

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).