Javascript: TXTextControl.ApplicationFieldFormat Enumeration
Description
The possible application field formats.
Members
| Member | Description |
|---|---|
| None | Unspecified field format. |
| MSWord | The field is supported and defined through Microsoft Word. |
| HighEdit | The field is supported and defined through the Heiler HighEdit component. |
| MSWordTXFormFields | This value can only be used with the LoadSettings.ApplicationFieldFormat property. |
Examples
The following example uses TXTextControl.ApplicationFieldFormat.MSWord (the field is supported and defined through Microsoft Word.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.textParts.getMainText(function(mainText) {
const applicationFields = mainText.applicationFields;
applicationFields.getItem(function(applicationField) {
if (!applicationField) {
console.warn("No application field is available at the current input position.");
return;
}
applicationField.setFormat(
TXTextControl.ApplicationFieldFormat.MSWord,
function() {
console.log("set format completed.");
}
);
}, onTxError);
}, onTxError);