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

Syntax

TXTextControl

Enumerations

Enumeration Description
ActivationState The current activation state.
AddResult Specifies the result when a subtextpart has been added to the document.
ApplicationFieldFormat The possible application field formats.
BarcodeAlignment Determines the alignment of the barcode image inside the control.
BarcodeTextAlignment Determines the alignment of the barcode text and additional text that is displayed inside the control.
BreakType Specifies where and how a text or section breaks.
ChangeKind Specifies the kind of a tracked change.
ClipboardMode Possible clipboard modes.
ControlChars Determines values for the control characters used in a TextControl document.
Direction Determines the writing direction of a paragraph.
DocumentAccessPermissions HTML only.
EditMode Determines the possible document edit modes.
FieldType Determines the possible MS Word specific merge field types supported by the TX Text Control JavaScript API.
FileType Specifies the kind of file types.
FindOptions Determines search options for the find method.
FontUnderlineStyle Specifies the style of the underline below a text.
FormulaReferenceStyle Specifies the style of references to table cells in formulas.
Frame Determines which frame borders are visible of an image, text frame, chart, barcode or drawing.
FrameInsertionMode Determines how the frame of an image, text frame, chart, barcode or drawing can be inserted in the text.
FrameStyle Determines the style of a frame of an image, text frame, chart, barcode or drawing.
HeaderFooterType Determines the type of a header or footer.
HighlightMode Contains all possible values for property highlightMode of class SubTextPart.
HorizontalAlignment Specifies the horizontal alignment of a text.
ImageFormat Specifies the file format of an image.
ImageInsertionMode Determines how an image can be inserted in the text.
Justification Specifies the kind of justification.
ListType Specifies the type of a list.
MeasuringUnit Specifies the measuring unit.
MergeFieldTextFormat Determines the possible text formats for merge fields containing text.
MisspelledWordKind Specifies the kind of a misspelled word.
NumberFormat Specifies the format of a numbered list.
PageContent Defines the contents of a page's image returned from the Page.getImage method.
PermanentControlChar Defines a control character which is shown permanently on the screen.
RelationalOperator Determines the relational operator used by some types of merge fields.
SectionBreakKind Specifies the kind of a section break.
SideBarType Specifies the existing side bar types.
SpecialZoomFactor Determines the special zoom factor values for property TXTextControl.zoomFactor.
StreamType Determines a certain text format.
TabType Determines the tabulator type.
TableAddPosition Specifies the position where to split the table.
TextFrameInsertionMode Determines how a text frame can be inserted in the text.
TextType Specifies how a text is represented and interpreted.
VerticalAlignment Specifies the vertical alignment of a text.
ViewMode The mode how Text Control displays a document.
ZOrder Specifies how the z-order of a frame (image, text frame, chart, barcode or drawing) can be changed.

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 Deprecated.
appendDocument Appends text in a certain format to the current document.
atobUTF8 Decodes a string of data which has been encoded using base-64 encoding.
btoaUTF8 Creates a base-64 encoded ASCII string from a unicode string.
clear Clears the selected text or the character right from the current input position.
find Finds a text string.
(Inherited from FormattedText)
focus Sets the text input focus to the web editor.
getActivationState Gets a value indicating the current activation state.
getAllowUndo Gets a value indicating whether the undo buffer is active or not.
getBackColor Gets the Text Control's background color.
getBaseline Gets the baseline alignment, in twips, of the Text Control.
getCanCharacterFormat Informs whether the currently selected text can be formatted with character formatting attributes.
getCanCopy Informs whether a part of a Text Control document has been selected and can be copied to the clipboard.
getCanDocumentFormat Informs whether the document can be formatted with page and section formatting attributes.
getCanPaste Informs whether the document's text and/or formatting attributes can be changed.
getCanPrint Informs whether the document can be printed.
getCanRedo Informs whether an operation can be re-done using the Redo method.
getCanStyleFormat Informs whether the document can be formatted with formatting styles.
getCanTableFormat Informs whether the currently selected text can be formatted with table formatting attributes.
getCanUndo Gets a value indicating whether the user can undo the previous operation in a Text Control.
getControlChars Gets whether the control characters are visible or not.
getCultures Returns the culture and the UI culture of the control.
getDocumentTargetMarkers Gets a value indicating that markers for hypertext targets are shown or not.
getDrawingMarkerLines Gets whether a marker frame is shown around a drawing to indicate its position and size.
getEditMode Gets a value indicating whether the document's text is protected, or can be freely edited and formatted.
getFileDirectory Deprecated.
getFontUnderlineStyle Gets underlining style for the text displayed by the control.
getForeColor Gets the foreground color of the control which is the color of the document's text.
getFormattingPrinter Returns the name of the currently selected formatting printer by calling a provided callback function.
getFormulaReferenceStyle Gets a value determining how references to table cells in formulas are specified.
getInstalledPrinters Gets the names of the printers installed on the server which are usable by Text Control.
getIsFormulaCalculationEnabled Gets a value indicating whether formulas in tables are automatically calculated when the text of an input cell is changed.
getIsHyphenationEnabled Gets a value indicating whether hyphenation is active or not.
getIsLanguageDetectionEnabled Gets a value indicating whether language detection is active or not.
getIsSpellCheckingEnabled Gets a value indicating whether spell checking is active or not.
getIsTrackChangesEnabled Gets a value indicating whether track changes is active or not.
getLandscape Gets a value indicating whether the page orientation is landscape.
getPageCount Gets the number of pages contained in the current document.
getPageUnit Gets the measure used for page sizes and page margins.
getPermanentControlChars Gets a value indicating which control characters are shown permanently on the screen.
getRedoActionName Gets a string that represents the name of the action that will be performed when a call to the redo method is made.
getSelectObjects Gets a value controlling the selection of objects which are inserted behind the text.
getStatusBarColor Returns the background color of the status bar by calling a provided callback function.
getSubTextParts Deprecated.
getSupportedFonts Gets an array of strings specifying the names of all currently supported fonts.
getSupportedPaperSizes Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes.
getText Gets the control's text.
getTextBackColor Gets the background color for the text.
getTextFields Deprecated.
getTextFrameMarkerLines Gets whether text frames that have no border line are shown with marker lines.
getTextParts Deprecated.
getUndoActionName Gets a string that represents the name of the action that will be performed when a call to the undo method is made.
getUserNames Gets a list of names specifying users who have access to editable regions.
getViewMode Gets the mode how Text Control displays a document.
load Loads text in a certain format.
loadDocument Loads text in a certain format.
loadJsonData Loads JSON data which is used to create table and field name menu items in the mailings ribbon tab.
loadSelection Deprecated.
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.
redo Redoes the last Text Control operation.
removeEventListener The removeListener function removes the specified event listener from the TXTextControl object.
removeFromDom Closes the WebSocket connection gracefully and removes the whole editor from the DOM.
removeTextField Deprecated.
resetContents Deletes the entire contents of the control.
save Saves the current document in a certain format and sends the result back asynchronously by calling a given callback function.
saveDocument Saves the current document in a certain format and sends the result back asynchronously by calling a given callback function.
saveSelection Deprecated.
select Selects text within the control.
selectAll Selects all text in the control.
selectWord Selects the word at the current text input position.
setActivationState Sets a value indicating the current activation state.
setAllowUndo Sets a value indicating whether the undo buffer is active or not.
setBackColor Sets the Text Control's background color.
setBaseline Sets the baseline alignment, in twips, of the Text Control.
setControlChars Sets whether the control characters are visible or not.
setDocumentTargetMarkers Sets a value indicating that markers for hypertext targets are shown or not.
setDrawingMarkerLines Sets whether a marker frame is shown around a drawing to indicate its position and size.
setEditMode Sets a value indicating whether the document's text is protected, or can be freely edited and formatted.
setFileDirectory Sets the directory path where the files of a specific file type are stored on the web server.
setFontUnderlineStyle Sets underlining style for the text displayed by the control.
setForeColor Sets the foreground color of the control which is the color of the document's text.
setFormattingPrinter Sets the name of a printer the text dimensions and capabilities of which are used to format the document.
setFormulaReferenceStyle Sets a value determining how references to table cells in formulas are specified.
setIsFormulaCalculationEnabled Sets a value indicating whether formulas in tables are automatically calculated when the text of an input cell is changed.
setIsHyphenationEnabled Sets a value indicating whether hyphenation is active or not.
setIsLanguageDetectionEnabled Sets a value indicating whether language detection is active or not.
setIsSpellCheckingEnabled Sets a value indicating whether spell checking is active or not.
setIsTrackChangesEnabled Sets a value indicating whether track changes is active or not.
setLandscape Sets a value indicating whether the page orientation is landscape.
setPageUnit Sets the measure used for page sizes and page margins.
setPermanentControlChars Sets a value indicating which control characters are shown permanently on the screen.
setSelectObjects Sets a value controlling the selection of objects which are inserted behind the text.
setStatusBarColor Sets the background color of the status bar.
setText Sets the control's text.
setTextBackColor Sets the background color for the text.
setTextFrameMarkerLines Sets whether text frames that have no border line are shown with marker lines.
setViewMode Sets the mode how Text Control displays a document.
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.
showSideBar Shows or hides a specified side bar.
showStatusBar Shows or hides the web editor's status bar.
showVerticalRuler Shows or hides the web editor's vertical ruler bar.
undo Undoes the last Text Control operation.
zoom Zooms the contents of the TextControl.

Properties

Property Description
applicationFields Gets a collection of all Microsoft Word fields that have been created or imported from a Microsoft Word or RTF document.
(Inherited from FormattedText)
barcodeTypeSettings The type specific settings for the currently used barcode.
barcodes Gets a collection of all barcode frames contained in the text part with the input focus.
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 Deprecated.
displayColors The displayed colors of the text control.
documentLinks Gets a collection of all links which point to targets in the same document.
(Inherited from FormattedText)
documentPermissions The document permission settings.
documentTargetMarkers Gets or sets whether document target markers are visible.
documentTargets Gets a collection of all document targets.
(Inherited from FormattedText)
editMode Deprecated.
editableRegions Gets a collection of all editable regions.
(Inherited from FormattedText)
formFields Gets a collection of all form fields in the document.
frames Gets a collection of all frames in the document.
headersAndFooters Gets a collection of all headers and footers in the document.
hypertextLinks Gets a collection of all hypertext links.
(Inherited from FormattedText)
images Gets a collection of all images contained in the text part with the input focus.
inlineStyles Gets a collection of all inline styles the current document contains.
inputFormat All formatting attributes at the current text input position.
inputPosition The current text input position.
isHyphenationEnabled Deprecated.
isLanguageDetectionEnabled Deprecated.
isLoadingDialogEnabled Gets or sets whether a wait dialog is shown while a document is being loaded.
isSpellCheckingEnabled Deprecated.
isTrackChangesEnabled Deprecated.
lines Gets a collection of all text lines.
(Inherited from FormattedText)
listFormat The type and the formatting attributes of a bulleted or numbered list.
misspelledWords Gets a collection of all misspelled words.
(Inherited from FormattedText)
pageMargins The margins for the pages of the current document.
pageSize The width and height of the pages for the current document.
pages Gets a collection of all pages in the document.
paragraphFormat The paragraph formatting attributes of the text displayed by the control.
paragraphStyles All paragraph formatting styles in the current document.
paragraphs Gets a collection of all paragraphs.
(Inherited from FormattedText)
ribbon Gets the control's ribbon bar object.
ribbonPermissionsTab Returns the "Permissions" ribbon tab object.
saveDocumentQuestionDialogEnabled Deprecated.
sections Gets a collection of all sections in the document.
selection Gets the current selection.
(Inherited from FormattedText)
subTextParts Gets the current subtextparts.
(Inherited from FormattedText)
tableGridLines Gets or sets if table grid lines are visible.
tables Gets a collection of all tables.
(Inherited from FormattedText)
textChars Gets a collection of all text characters.
(Inherited from FormattedText)
textFields Gets a collection of all standard text fields.
(Inherited from FormattedText)
textFieldsEditable Gets or sets if text fields are editable or not.
textFrameMarkerLines Gets or sets if text frame marker lines are visible.
textFrames Gets a collection of all text frames in the document.
textParts Gets a collection of all main text parts the current document contains.
trackedChanges Gets a collection of all tracked changes.
(Inherited from FormattedText)
zoomFactor Deprecated.

Further Reading

Learn more about the Javascript: TXTextControl Object in the Text Control Blog: