mirror of
https://github.com/codex-team/editor.js
synced 2024-06-02 14:02:17 +02:00
48ac2271f9
Co-authored-by: Murod Khaydarov <murod.haydarov@gmail.com> Co-authored-by: Petr Savchenko <specc.dev@gmail.com> Co-authored-by: George Berezhnoy <gohabereg@gmail.com> Co-authored-by: Taly Guryn <vitalik7tv@yandex.ru>
984 B
984 B
CodeX Editor Events Module
Module allows Developers to subscribe on events or trigger own events
Methods
On
Events.on(eventName, callback)
Method subscribes callback on event. It will be called when CodeX Editor emits this event
params
Param | Type | Description |
---|---|---|
eventName | String | event name |
callback | Function | event callback |
Off
Events.off(eventName, callback)
Method unsubscribes callback on event
params
Param | Type | Description |
---|---|---|
eventName | String | event name |
callback | Function | event callback |
Emit
Events.emit(eventName, data)
Method emits data to all subscribed callbacks
params
Param | Type | Description |
---|---|---|
eventName | String | event name |
data | Object | any data |