Javascript: TXTextControl.Selection.getForeColor Method

Gets the color used to display the selected text. Takes a callback function as a parameter which is called with the color used to display the selected text.

Introduced: 26.0.

Syntax

[JavaScript]
<void> Selection.getForeColor(<function> callback);
Parameter Description
callback

A function with one parameter. Is called with the color used to display the selected text. The color attribute is if available the color's name else the HEX value as a string. The property's default value is the HTML Color windowtext. The property returns its default value when the text selection contains multiple characters with mixed colors.

See Also