onLinkEvents([callback], [remove])
Class: DocumentEditor.
Description:
Registers, unregisters, and gets an Array of event handlers for the event when user clicks on a hyperlink. It gives the ability to create a custom action for hyperlink clicks. Check for event Object format in example below.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
function |
Handler function receiving LinkEvent object. Pass |
|
|
boolean |
Set to |
Returns:
Returns an array of registered handler functions if arguments are omitted, otherwise returns this component instance.
Type: Array.<function()> | ComboBox
Examples:
// LinkEvent format example
LinkEvent {
target: DocumentEditor, // This component
type: string, // `click`, `mouseenter`, or `mouseleave`
url: string, // The href="" attribute of the `a` tag
text: string, // Text of the hyperlink
shift: boolean, // Indicates if Shift key was pressed when the event occurred
ctrl: boolean, // Indicates if Ctrl key was pressed when the event occurred
alt: boolean, // Indicates if Alt key was pressed when the event occurred
modifiers: string // Keyboard modifiers mask
modifiersText: string // Text representation of keyboard modifiers
}
