Javascript: TXTextControl.ViewMode Enumeration
Description
The mode how Text Control displays a document.
Members
| Member | Description |
|---|---|
| PageView | Text is formatted like in Normal view mode, and additionally the Text Control displays the pages in 3D view with gaps and a desktop background. Headers and footers are displayed in WYSIWYG mode. |
| Normal | Text is formatted according to the settings of the PageSize and the PageMargins properties. Headers and footers can be inserted but they are not displayed. |
Examples
The following example uses TXTextControl.ViewMode.PageView (text is formatted like in Normal view mode, and additionally the Text Control displays the pages in 3D view with gaps and a desktop background. Headers and footers are displayed in WYSIWYG mode.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.setViewMode(
TXTextControl.ViewMode.PageView,
function() {
console.log("set view mode completed.");
},
onTxError
);