Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.
iAmGio edited this page Jul 11, 2019 · 16 revisions

There are some functions called by the program which can be called events.

They are: (list will expand)

  • onLoad(): called once the add-on is loaded
  • onInit(): called once Chorus is fully initialized
  • onClose(): called once Chorus is closed
  • onDisable(): called once the add-on is manually disabled. NOT called by onClose().
  • onKeyPress(event): called every time a key or a key combination is pressed. event refers a JavaFX KeyEvent.
  • onDropMenuOpen(type, menu): called when a drop-menu is opened. type is a string which refers to a unique identifier of the menu. menu is the menu itself.
  • onTabOpen(tab): called when a new file is opened in the editor.
  • onAreaTextChange(change, area): called every time a text in an editor area is changed.
  • onHighlightingUpdate(area): called whenever an editor area updates its highlighting.

Example code:

load(chorus_js_api);

function onLoad() {
    print('I have been initialized');
}

function onInit() {
    print('Chorus has been initialized');
}

function onClose() {
    print('Chorus has been closed');
}

Clone this wiki locally