Javascript: TXTextControl.CapitalizationSettings Enumeration
Description
Specifies the settings for capitalization.
Members
| Member | Description |
|---|---|
| ToUpper | All letters are changed to uppercase. |
| ToLower | All letters are changed to lowercase. |
| CapitalizeEachWord | The first letter of each word is capitalized. |
| CapitalizeEachSentence | The first letter of each sentence is capitalized. |
| ToggleCase | Lowercase letters are changed to uppercase and vice versa. |
Examples
The following example uses TXTextControl.CapitalizationSettings.ToUpper (all letters are changed to uppercase.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.selection.changeCapitalization(
TXTextControl.CapitalizationSettings.ToUpper,
function() {
console.log("change capitalization completed.");
},
onTxError
);