TXTextControl Object

The TXTextControl JavaScript object provides a public API to manipulate the web editor via JavaScript functions in the browser.

Syntax

[JavaScript]
TXTextControl

Properties

Property Description
clipboardMode Gets or sets the clipboard mode (client or server).
contextMenusEnabled Gets or sets if a right click into the text area opens a context menu or not.
controlChars Gets or sets if control characters are visible.
documentPermissions Gets or sets the document permissions.
documentTargetMarkers Gets or sets if document target markers are visible.
editMode Gets or sets the edit mode the control is in.
images Provides methods for adding images to the document.
isHyphenationEnabled Gets or sets a value indicating whether hyphenation is active or not.
isLanguageDetectionEnabled Gets or sets a value indicating whether language detection is active or not.
isLoadingDialogEnabled Gets or sets if a wait dialog is shown while a document is being loaded.
isSpellCheckingEnabled Gets or sets a value indicating whether spell checking is active or not.
ribbon Gets the control's ribbon bar object.
ribbonPermissionsTab Returns the "Permissions" ribbon tab object.
saveDocumentQuestionDialogEnabled Gets or sets if a confirmation dialog should be shown before discarding unsaved changes.
selection Gets the current selection.
tableGridLines Gets or sets if table grid lines are visible.
textFieldsEditable Gets or sets if text fields are editable or not.
textFrameMarkerLines Gets or sets if text frame marker lines are visible.
textFrames Provides methods for adding text frames to the document.
zoomFactor Gets or sets the zoom factor, in percent, for a Text Control.

Methods

Method Description
addEventListener The addEventListener function registers event listener functions on the TXTextControl object.
addMergeField Inserts a merge field at the current input position.
addTextField Inserts a new ApplicationField or TextField at the current input position.
appendDocument Appends text in a certain format to the current document.
focus The focus function sets the text input focus to the web editor.
getBackColor Returns the background color of the main text area and the ruler bars by calling a provided callback function.
getCultures Returns the culture and the UI culture of the control.
getFileDirectory Requests the directory path where the files of a specific file type are stored on the web server.
getFormattingPrinter Returns the name of the currently selected formatting printer by calling a provided callback function.
getInstalledPrinters Gets the names of the printers installed on the server which are usable by Text Control.
getStatusBarColor Returns the background color of the status bar by calling a provided callback function.
getSubTextParts Requests a collection of either all SubTextParts the current text part contains or only the SubTextPart containing the input position from the server and returns the collection by calling a callback function which has to be provided as a parameter to the function.
getTextFields Requests a collection of either all text fields the current text part contains or only the text field containing the input position from the server and returns the collection by calling a callback function which has to be provided as a parameter to the function.
getTextParts Requests a collection of either all text parts the current document contains or only the text part containing the input position from the server and returns the collection by calling a callback function which has to be provided as a parameter to the function.
loadDocument Loads text in a certain format.
loadSelection Loads text in a certain format into the current selection.
loadXMLDatabase Loads an XML database which is used to create table and field name menu items in the mailings ribbon tab.
printDocument Attempts to print the current document in the browser.
removeEventListener The removeListener function removes the specified listener from the TXTextControl object.
removeFromDom The removeFromDom method closes the WebSocket connection gracefully and removes the whole editor from the DOM.
removeTextField The removeTextField method removes a text field from the document.
resetContents Deletes the entire contents of the control.
saveDocument Saves the current document in a certain format and sends the result back asynchronously by calling a given callback function.
saveSelection Saves the current selection in a certain format and sends the result back asynchronously by calling a given callback function.
setBackColor Sets the background color of the main text area and the ruler bars.
setFileDirectory Sets the directory path where the files of a specific file type are stored on the web server.
setFormattingPrinter Sets the name of a printer the text dimensions and capabilities of which are used to format the document.
setStatusBarColor Sets the background color of the status bar.
showHorizontalRuler Shows or hides the web editor's horizontal ruler bar.
showMergeFieldDialog Opens a field dialog either for changing properties of an existing merge field or for creating a new merge field.
showRibbonBar Shows or hides the ribbon bar.
showStatusBar Shows or hides the web editor's status bar.
showVerticalRuler Shows or hides the web editor's vertical ruler bar.

Enumerations

Enumeration Description
EditMode Determines the possible document edit modes.
FileType Specifies the kind of file types.

See Also