Javascript: TXTextControl.Direction Enumeration
Description
Determines the writing direction of a paragraph.
Members
| Member | Description |
|---|---|
| LeftToRight | The writing direction is left to right, which means that blocks of text with left to right and right to left characters are ordered from left to right. |
| RightToLeft | The writing direction is right to left, which means that blocks of text with left to right and right to left characters are ordered from right to left. |
Examples
The following example uses TXTextControl.Direction.LeftToRight (the writing direction is left to right, which means that blocks of text with left to right and right to left characters are ordered from left to right.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.paragraphFormat.setDirection(
TXTextControl.Direction.LeftToRight,
function() {
console.log("set direction completed.");
},
onTxError
);