Syntax.js - Documentation - Binding Options - Custom Triggers

Below is a list of all the binding options custom triggers supported in Syntax.js, which are fired when specific actions occur.

Download Now

v3.1.0 - 6th Sep 2024
Option Triggers

For Rendering:

options.events.onBeforeRenderComplete( element ):

Fires before the rendering of the syntax of an element.
Parameter: element: object - The DOM element that is going to be rendered.

options.events.onRenderComplete( element ):

Fires when the rendering of the syntax for an element is complete.
Parameter: element: object - The DOM element that was rendered.

options.events.onKeywordRender( keyword ):

Fires when a keyword is rendered.
Parameter: keyword: string - The keyword that was rendered.

options.events.onValueRender( value ):

Fires when a value is rendered.
Parameter: value: string - The value that was rendered.

options.events.onAttributeRender( attribute ):

Fires when a attribute is rendered.
Parameter: attribute: string - The attribute that was rendered.

options.events.onStringRender( string ):

Fires when a string is rendered.
Parameter: string: string - The string that was rendered.

options.events.onCommentRender( comment ):

Fires when a comment is rendered.
Parameter: comment: string - The comment that was rendered.


For Code:

options.events.onCopy( code ):

Fires when the "Copy" button is pressed.
Parameter: code: string - The string that was copied to the clipboard.

options.events.onKeywordClicked( keyword ):

Fires when a keyword is clicked in the code syntax.
Parameter: keyword: string - The keyword that was clicked.

options.events.onValueClicked( value ):

Fires when a value is clicked in the code syntax.
Parameter: value: string - The value that was clicked.

options.events.onAttributeClicked( attribute ):

Fires when a attribute is clicked in the code syntax.
Parameter: attribute: string - The attribute that was clicked.

options.events.onPrint( code ):

Fires when the "Print" button is pressed.
Parameter: code: string - The string that was sent to the printer.


For Buttons:

options.events.onButtonsClosed():

Fires when the buttons are closed.

options.events.onButtonsOpened():

Fires when the buttons are opened.