TXTextControl Object

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

Syntax

TXTextControl

Properties

Property Description
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.
documentTargetMarkers Gets or sets if document target markers are visible.
editMode Gets or sets the edit mode the control is in.
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.
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.

Methods

Method Description
addEventListener The addEventListener function registers event listener functions on the TXTextControl object.
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.
getTextParts Requests a collection of all text parts the current document contains 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.
removeEventListener The removeListener function removes the specified listener from the TXTextControl object.
removeFromDom The removeFromDom function closes the WebSocket connection gracefully and removes the whole editor from the DOM.
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.
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.
StreamType Determines a certain text format.

See Also