Events
Registering and triggering events
removeAllEventListeners()
Remove all registered events
on(name, eventType, func)
Register event listener for a specific plugin
Parameters
Param
Type
Description
name
string
Required - The plugin which listens for the event.
eventType
string
Required - The event to listen for.
func
function
Required - Function to call when event is triggered.
Example
off(name, eventType)
Unregister event listener for a specific plugin.
Parameters
Param
Type
Description
name
string
Required - The plugin which listens for the event.
eventType
string
Required - The event to stop listening for.
Example
trigger(name, eventType, [data])
Trigger an event of specified type with optional specified data
Parameters
Param
Type
Default
Description
name
string
Required - Plugin name or originator of event
eventType
string
Required - Event type to trigger (mandatory)
data
object
Optional data structure to send with event
Example
triggerEvent()
Deprecated
Use api.events.trigger()
instead, deprecated. Deprecated since 2018-11-20.
documentChanged()
Deprecated
Use api.events.trigger()
with Event.DOCUMENT_CHANGED
instead. Deprecated since 2018-11-20.
externalUpdate()
Deprecated
Use api.events.trigger()
with Event.DOCUMENT_CHANGED_EXTERNAL
instead. Deprecated since 2018-11-20.
documentReplaced()
Deprecated
Use api.events.trigger()
with Event.DOCUMENT_REPLACED
instead. Deprecated since 2018-11-20.
documentSaved()
Deprecated
Use api.events.trigger()
with Event.DOCUMENT_SAVED
instead. Deprecated since 2018-11-20.
documentSaveFailed()
Deprecated
Use api.events.trigger()
with Event.DOCUMENT_SAVE_FAILED
instead. Deprecated since 2018-11-20.
userActionSave()
Deprecated
Use api.events.trigger()
with Event.USERACTION_SAVE
instead. Deprecated since 2018-11-20.
userActionCancelSave()
Deprecated
Use api.events.trigger()
with Event.USERACTION_CANCEL_SAVE
instead. Deprecated since 2018-11-20.
userActionLock()
Deprecated
Use api.events.trigger()
with Event.USERACTION_LOCK
instead. Deprecated since 2018-11-20.
userActionUnlock()
Deprecated
Use api.events.trigger()
with Event.USERACTION_UNLOCK
instead. Deprecated since 2018-11-20.
languageChanged()
Deprecated
Use api.events.trigger()
with Event.ARTICLELANGUAGE_CHANGED
instead. Deprecated since 2018-11-20.
onDocumentStartSaving()
Deprecated
Use api.events.trigger()
with "document:startsaving"
instead. Deprecated since 2018-11-20.
Last updated