isDirectionLTR (XSPContext - JavaScript)

Checks if the base direction of text is left to right.

Defined in

XSPContext (JavaScript)

Syntax

isDirectionLTR() : boolean
Return value Description
boolean true if the base direction of text in the context is left to right; false if it is right to left.

Usage

Left to right means all text displays in that direction. Right to left means the text display is bidirectional.

Examples

This computed field displays the base direction of the base on the page.
if(context.isDirectionLTR()) {
	return "Reading order is left to right"
} else {
	return "Reading order is right to left"
}