Class

TextControlContext

TextControlContext()

Constructor

# new TextControlContext()

View Source TextControlContext.js, line 12

Methods

# addEventListener(eventName, callback)

The addEventListener function registers event listener functions on the TXTextControl object.
Parameters:
Name Type Description
eventName T
callback TXTextControlTypeDefinition.EventMapCallback.<T>

View Source TextControlContext.js, line 20

# addMergeField(mergeField)

Inserts a merge field at the current input position.
Parameters:
Name Type Description
mergeField TXTextControlTypeDefinition.MergeField | TXTextControlTypeDefinition.IfField | TXTextControlTypeDefinition.IncludeTextField | TXTextControlTypeDefinition.DateField | TXTextControlTypeDefinition.NextField | TXTextControlTypeDefinition.NextIfField

View Source TextControlContext.js, line 28

# append(streamType, base64Data, loadSettings, appendSettings) → {Promise.<void>}

Appends text to the document in a certain format.
Parameters:
Name Type Description
streamType TXTextControlTypeDefinition.StreamType Specifies one of the numerical StreamType values.
base64Data string Base64 encoded document data. For encoding strings containing characters outside of the Latin1 range use TXTextControl.btoaUTF8.
loadSettings TXTextControlTypeDefinition.LoadSettings | null Additional settings for appending the data. Can be null.
appendSettings TXTextControlTypeDefinition.AppendSettings Settings on how the document is appended.

View Source TextControlContext.js, line 40

Promise.<void>

# appendDocument(streamType, base64Data)

Appends text in a certain format to the current document.
Parameters:
Name Type Description
streamType TXTextControlTypeDefinition.StreamType Specifies one of the numerical StreamType values.
base64Data string Base64 encoded document data. For encoding strings containing characters outside of the Latin1 range use TXTextControl.btoaUTF8.

View Source TextControlContext.js, line 57

# atobUTF8(inputString, keepBOM) → {string}

Decodes a string of data which has been encoded using base-64 encoding.
Parameters:
Name Type Description
inputString string A base-64 encoded unicode string.
keepBOM boolean Optional. Set this to true in case the original string had a byte order mark and you want to keep it.

View Source TextControlContext.js, line 67

The original unicode string.
string

# beginUndoAction(actionName) → {Promise.<void>}

Begins a user - defined undo operation. All editing and fomatting changes made between beginUndoAction and endUndoAction belong to the undo operation. These changes are undone or redone in a single step. The specified user-defined name is available via getUndoActionName.
Parameters:
Name Type Description
actionName string | null Specifies the undo action's name. If an action name is not necessary, this parameter can be null or an empty string.

View Source TextControlContext.js, line 78

Promise.<void>

# btoaUTF8(inputString, addBOM) → {string}

Creates a base-64 encoded ASCII string from a unicode string. In contrast to the browser provided method btoa() this method handles all unicode characters and not only characters in the Latin1 range.
Parameters:
Name Type Description
inputString string A unicode string to be encoded into base-64.
addBOM boolean Optional. Set this to true if a byte order mark should be added to the encoded string.

View Source TextControlContext.js, line 89

A base-64 encoded string.
string

# clear() → {Promise.<void>}

Clears the selected text or the character right from the current input position.

View Source TextControlContext.js, line 96

Promise.<void>

# clearUndo() → {Promise.<void>}

Clears the undo buffer.

View Source TextControlContext.js, line 104

Promise.<void>

# endUndoAction() → {Promise.<void>}

Ends a user-defined undo operation. All editing and fomatting changes made between beginUndoAction and endUndoAction belong to the undo operation. These changes are undone or redone in a single step.

View Source TextControlContext.js, line 113

Promise.<void>

# find(text, start, options) → {Promise.<number>}

Finds a text string. The search starts at the specified position.
Parameters:
Name Type Description
text string Specifies the text to search for.
start number Specifies the text position where the search starts, beginning with 0. If this value is -1, the search begins at the current text input position.
options TXTextControlTypeDefinition.FindOptions | null Optional. Specifies search options. It can be a combination of the FindOptions values.

View Source TextControlContext.js, line 123

index of first character of the search string
Promise.<number>

# flattenFormFields() → {Promise.<void>}

Flatten all form fields in the document. This means that all form fields are converted to static text.

View Source TextControlContext.js, line 130

Promise.<void>

# focus()

Sets the text input focus to the web editor.

View Source TextControlContext.js, line 134

# getActivationState() → {Promise.<TXTextControlTypeDefinition.ActivationState>}

Gets a value indicating the current activation state.

View Source TextControlContext.js, line 141

Promise.<TXTextControlTypeDefinition.ActivationState>

# getAllowUndo() → {Promise.<boolean>}

Gets a value indicating whether the undo buffer is active or not.

View Source TextControlContext.js, line 148

Promise.<boolean>

# getBackColor() → {Promise.<string>}

Gets the Text Control's background color.

View Source TextControlContext.js, line 155

Promise.<string>

# getBaseline() → {Promise.<number>}

Gets the baseline alignment, in twips, of the Text Control.

View Source TextControlContext.js, line 162

Promise.<number>

# getCanCharacterFormat() → {Promise.<boolean>}

Informs whether the currently selected text can be formatted with character formatting attributes.

View Source TextControlContext.js, line 169

Promise.<boolean>

# getCanCopy() → {Promise.<boolean>}

Informs whether a part of a Text Control document has been selected and can be copied to the clipboard.

View Source TextControlContext.js, line 176

Promise.<boolean>

# getCanDocumentFormat() → {Promise.<boolean>}

Informs whether the document can be formatted with page and section formatting attributes.

View Source TextControlContext.js, line 183

Promise.<boolean>

# getCanPaste() → {Promise.<boolean>}

Informs whether the document's text and/or formatting attributes can be changed.

View Source TextControlContext.js, line 190

Promise.<boolean>

# getCanPrint() → {Promise.<boolean>}

Informs whether the document can be printed.

View Source TextControlContext.js, line 197

Promise.<boolean>

# getCanRedo() → {Promise.<boolean>}

Informs whether an operation can be re - done using the Redo method.

View Source TextControlContext.js, line 204

Promise.<boolean>

# getCanStyleFormat() → {Promise.<boolean>}

Informs whether the document can be formatted with formatting styles.

View Source TextControlContext.js, line 211

Promise.<boolean>

# getCanTableFormat() → {Promise.<boolean>}

Informs whether the currently selected text can be formatted with table formatting attributes.

View Source TextControlContext.js, line 218

Promise.<boolean>

# getCanUndo() → {Promise.<boolean>}

Gets a value indicating whether the user can undo the previous operation in a Text Control.

View Source TextControlContext.js, line 225

Promise.<boolean>

# getCommentHighlightMode() → {Promise.<TXTextControlTypeDefinition.HighlightMode>}

Gets the global comment highlight mode.

View Source TextControlContext.js, line 232

Promise.<TXTextControlTypeDefinition.HighlightMode>

# getControlChars() → {Promise.<boolean>}

Gets whether the control characters are visible or not.

View Source TextControlContext.js, line 239

Promise.<boolean>

# getCultures()

Returns the culture and the UI culture of the control.

View Source TextControlContext.js, line 243

# getDocumentTargetMarkers() → {Promise.<boolean>}

Gets a value indicating that markers for hypertext targets are shown or not.

View Source TextControlContext.js, line 250

Promise.<boolean>

# getDrawingMarkerLines() → {Promise.<boolean>}

Gets whether a marker frame is shown around a drawing to indicate its position and size.

View Source TextControlContext.js, line 257

Promise.<boolean>

# getEditMode() → {Promise.<TXTextControlTypeDefinition.EditMode>}

Gets a value indicating whether the document's text is protected, or can be freely edited and formatted.

View Source TextControlContext.js, line 264

Promise.<TXTextControlTypeDefinition.EditMode>

# getEditableRegionHighlightMode() → {Promise.<TXTextControlTypeDefinition.HighlightMode>}

Gets the global editable region highlight mode.

View Source TextControlContext.js, line 271

Promise.<TXTextControlTypeDefinition.HighlightMode>

# getFontUnderlineStyle() → {Promise.<TXTextControlTypeDefinition.FontUnderlineStyle>}

Gets underlining style for the text displayed by the control.

View Source TextControlContext.js, line 283

Promise.<TXTextControlTypeDefinition.FontUnderlineStyle>

# getForeColor() → {Promise.<string>}

Gets the foreground color of the control which is the color of the document's text.

View Source TextControlContext.js, line 290

Promise.<string>

# getFormattingPrinter() → {Promise.<string>}

Returns the name of the currently selected formatting printer by calling a provided callback function.

View Source TextControlContext.js, line 297

Promise.<string>

# getFormulaReferenceStyle() → {Promise.<TXTextControlTypeDefinition.FormulaReferenceStyle>}

Gets a value determining how references to table cells in formulas are specified.

View Source TextControlContext.js, line 304

Promise.<TXTextControlTypeDefinition.FormulaReferenceStyle>

# getInstalledPrinters() → {Promise.<Array.<string>>}

Gets the names of the printers installed on the server which are usable by Text Control.

View Source TextControlContext.js, line 315

Promise.<Array.<string>>

# getIsFormFieldValidationEnabled() → {Promise.<boolean>}

Gets a value indicating whether form field validation is active or not.

View Source TextControlContext.js, line 322

Promise.<boolean>

# getIsFormulaCalculationEnabled() → {Promise.<boolean>}

Gets a value indicating whether formulas in tables are automatically calculated when the text of an input cell is changed.

View Source TextControlContext.js, line 329

Promise.<boolean>

# getIsHyphenationEnabled() → {Promise.<boolean>}

Gets a value indicating whether hyphenation is active or not.

View Source TextControlContext.js, line 336

Promise.<boolean>

# getIsLanguageDetectionEnabled() → {Promise.<boolean>}

Gets a value indicating whether language detection is active or not.

View Source TextControlContext.js, line 343

Promise.<boolean>

# getIsSpellCheckingEnabled() → {Promise.<boolean>}

Gets a value indicating whether spell checking is active or not.

View Source TextControlContext.js, line 350

Promise.<boolean>

# getIsTrackChangesEnabled() → {Promise.<boolean>}

Gets a value indicating whether track changes is active or not.

View Source TextControlContext.js, line 357

Promise.<boolean>

# getLandscape() → {Promise.<boolean>}

Gets a value indicating whether the page orientation is landscape.

View Source TextControlContext.js, line 364

Promise.<boolean>

# getPageCount() → {Promise.<number>}

Gets the number of pages contained in the current document.

View Source TextControlContext.js, line 371

Promise.<number>

# getPageUnit() → {Promise.<TXTextControlTypeDefinition.MeasuringUnit>}

Gets the measure used for page sizes and page margins.

View Source TextControlContext.js, line 378

Promise.<TXTextControlTypeDefinition.MeasuringUnit>

# getPermanentControlChars() → {Promise.<TXTextControlTypeDefinition.PermanentControlChar>}

Gets a value indicating which control characters are shown permanently on the screen.

View Source TextControlContext.js, line 385

Promise.<TXTextControlTypeDefinition.PermanentControlChar>

# getRedoActionName() → {Promise.<string>}

Gets a string that represents the name of the action that will be performed when a call to the redo method is made.

View Source TextControlContext.js, line 396

Promise.<string>

# getRenderMode() → {Promise.<TXTextControlTypeDefinition.ComponentRenderMode>}

Gets the component render mode.

View Source TextControlContext.js, line 403

Promise.<TXTextControlTypeDefinition.ComponentRenderMode>

# getSelectObjects() → {Promise.<boolean>}

Gets a value controlling the selection of objects which are inserted behind the text.

View Source TextControlContext.js, line 410

Promise.<boolean>

# getStatusBarColor() → {Promise.<string>}

Returns the background color of the status bar as a hexadecimal CSS color string.

View Source TextControlContext.js, line 417

Promise.<string>

# getSupportedFonts() → {Promise.<Array.<string>>}

Gets an array of strings specifying the names of all currently supported fonts.

View Source TextControlContext.js, line 425

Promise.<Array.<string>>

# getSupportedPaperSizes() → {Promise.<Array.<TXTextControlTypeDefinition.PaperSize>>}

Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes.

View Source TextControlContext.js, line 432

Promise.<Array.<TXTextControlTypeDefinition.PaperSize>>

# getText() → {Promise.<string>}

Gets the control's text.

View Source TextControlContext.js, line 439

Promise.<string>

# getTextBackColor() → {Promise.<string>}

Gets the background color for the text.

View Source TextControlContext.js, line 446

Promise.<string>

# getTextFieldsByType(fieldType) → {Promise.<Array.<TXTextControlTypeDefinition.TextFieldInfo>>}

Returns an array of static text field information objects. (Inherited from FormattedText)
Parameters:
Name Type Description
fieldType TXTextControlTypeDefinition.TextFieldType

View Source TextControlContext.js, line 454

Promise.<Array.<TXTextControlTypeDefinition.TextFieldInfo>>

# getTextFrameMarkerLines() → {Promise.<boolean>}

Gets whether text frames that have no border line are shown with marker lines.

View Source TextControlContext.js, line 466

Promise.<boolean>

# getUndoActionName() → {Promise.<string>}

Gets a string that represents the name of the action that will be performed when a call to the undo method is made. The property's value is null if there is no action that can be undone.

View Source TextControlContext.js, line 474

Promise.<string>

# getUserNames() → {Promise.<Array.<string>>}

Gets a list of names specifying users who have access to editable regions.

View Source TextControlContext.js, line 481

Promise.<Array.<string>>

# getViewMode() → {Promise.<TXTextControlTypeDefinition.ViewMode>}

Gets the mode how Text Control displays a document.

View Source TextControlContext.js, line 488

Promise.<TXTextControlTypeDefinition.ViewMode>

# init(settings)

Initializes the document editor.
Parameters:
Name Type Description
settings TXTextControlTypeDefinition.ComponentSettings

View Source TextControlContext.js, line 495

# async initialize(componentSettings, jsResourceFilePathopt) → {Promise.<void>}

Loads resource files and initializes the document editor after TXTextControl is available
Parameters:
Name Type Attributes Default Description
componentSettings TXTextControlTypeDefinition.ComponentSettings
jsResourceFilePath string <optional>
"/GetResource?name=tx-document-editor.min.js"

View Source TextControlContext.js, line 1101

Promise.<void>

# load(streamType, base64Data, loadSettingsopt) → {Promise.<TXTextControlTypeDefinition.LoadDocumentCallbackData>}

Loads text in a certain format.
Parameters:
Name Type Attributes Description
streamType TXTextControlTypeDefinition.StreamType
base64Data string
loadSettings TXTextControlTypeDefinition.LoadSettings <optional>

View Source TextControlContext.js, line 505

Promise.<TXTextControlTypeDefinition.LoadDocumentCallbackData>

# loadDocument(streamType, base64Data, loadSettingsopt) → {Promise.<TXTextControlTypeDefinition.LoadDocumentCallbackData>}

Loads text in a certain format.
Parameters:
Name Type Attributes Description
streamType TXTextControlTypeDefinition.StreamType
base64Data string
loadSettings TXTextControlTypeDefinition.LoadSettings <optional>

View Source TextControlContext.js, line 522

Promise.<TXTextControlTypeDefinition.LoadDocumentCallbackData>

# loadJsonData(jsonData) → {Promise.<void>}

Loads JSON data which is used to create table and field name menu items in the mailings ribbon tab.
Parameters:
Name Type Description
jsonData string

View Source TextControlContext.js, line 537

Promise.<void>

# loadXMLDatabase(xmlData) → {Promise.<void>}

Loads an XML database which is used to create table and field name menu items in the mailings ribbon tab.
Parameters:
Name Type Description
xmlData string

View Source TextControlContext.js, line 545

Promise.<void>

# printDocument()

Attempts to print the current document in the browser. Not all browsers support this.

View Source TextControlContext.js, line 549

# redo() → {Promise.<void>}

Redoes the last Text Control operation.

View Source TextControlContext.js, line 556

Promise.<void>

# refreshLayout()

Forces a layout refresh of the document editor. Use this method in cases where the editor doesn't automatically react to layout changes of your web site.

View Source TextControlContext.js, line 563

# removeEventListener(eventName, callback)

The removeListener function removes the specified event listener from the TXTextControl object.
Parameters:
Name Type Description
eventName T
callback TXTextControlTypeDefinition.EventMapCallback.<T>

View Source TextControlContext.js, line 572

# removeFromDom()

Closes the WebSocket connection gracefully and removes the whole editor from the DOM.

View Source TextControlContext.js, line 576

# resetContents() → {Promise.<void>}

Deletes the entire contents of the control.

View Source TextControlContext.js, line 583

Promise.<void>

# async save(streamType, saveSettingsopt) → {Promise.<TXTextControlTypeDefinition.SaveDocumentResult>}

Saves the current document in a certain format and sends the result back asynchronously by calling a given callback function.
Parameters:
Name Type Attributes Description
streamType TXTextControlTypeDefinition.StreamType
saveSettings TXTextControlTypeDefinition.SaveSettings <optional>

View Source TextControlContext.js, line 592

Promise.<TXTextControlTypeDefinition.SaveDocumentResult>

# saveDocument(streamType, saveSettingsopt) → {Promise.<TXTextControlTypeDefinition.SaveDocumentResult>}

Saves the current document in a certain format and sends the result back asynchronously by calling a given callback function.
Parameters:
Name Type Attributes Description
streamType TXTextControlTypeDefinition.StreamType
saveSettings TXTextControlTypeDefinition.SaveSettings <optional>

View Source TextControlContext.js, line 607

Promise.<TXTextControlTypeDefinition.SaveDocumentResult>

# select(start, length) → {Promise.<void>}

Selects text within the control.
Parameters:
Name Type Description
start number
length number

View Source TextControlContext.js, line 622

Promise.<void>

# selectAll() → {Promise.<void>}

Selects all text in the control.

View Source TextControlContext.js, line 629

Promise.<void>

# selectWord() → {Promise.<void>}

Selects the word at the current text input position.

View Source TextControlContext.js, line 636

Promise.<void>

# setActivationState(activationState) → {Promise.<void>}

Sets a value indicating the current activation state.
Parameters:
Name Type Description
activationState TXTextControlTypeDefinition.ActivationState

View Source TextControlContext.js, line 644

Promise.<void>

# setAllowUndo(allowUndo) → {Promise.<void>}

Sets a value indicating whether the undo buffer is active or not.
Parameters:
Name Type Description
allowUndo boolean

View Source TextControlContext.js, line 657

Promise.<void>

# setBackColor(htmlColor) → {Promise.<void>}

Sets the Text Control's background color.
Parameters:
Name Type Description
htmlColor string

View Source TextControlContext.js, line 665

Promise.<void>

# setBaseline(baseline) → {Promise.<void>}

Sets the baseline alignment, in twips, of the Text Control.
Parameters:
Name Type Description
baseline number

View Source TextControlContext.js, line 673

Promise.<void>

# setCommentHighlightMode(value) → {Promise.<void>}

Sets the global comment highlight mode.
Parameters:
Name Type Description
value TXTextControlTypeDefinition.HighlightMode

View Source TextControlContext.js, line 681

Promise.<void>

# setControlChars(controlChars) → {Promise.<void>}

Sets whether the control characters are visible or not.
Parameters:
Name Type Description
controlChars boolean

View Source TextControlContext.js, line 689

Promise.<void>

# setDocumentTargetMarkers(documentMarkerLines) → {Promise.<void>}

Sets a value indicating that markers for hypertext targets are shown or not.
Parameters:
Name Type Description
documentMarkerLines boolean

View Source TextControlContext.js, line 697

Promise.<void>

# setDrawingMarkerLines(drawingMarkerLines) → {Promise.<void>}

Sets whether a marker frame is shown around a drawing to indicate its position and size.
Parameters:
Name Type Description
drawingMarkerLines boolean

View Source TextControlContext.js, line 710

Promise.<void>

# setEditMode(editMode) → {Promise.<void>}

Sets a value indicating whether the document's text is protected, or can be freely edited and formatted.
Parameters:
Name Type Description
editMode TXTextControlTypeDefinition.EditMode

View Source TextControlContext.js, line 723

Promise.<void>

# setEditableRegionHighlightMode(value) → {Promise.<void>}

Sets the global editable region highlight mode.
Parameters:
Name Type Description
value TXTextControlTypeDefinition.HighlightMode

View Source TextControlContext.js, line 731

Promise.<void>

# setFontUnderlineStyle(style) → {Promise.<void>}

Sets underlining style for the text displayed by the control.
Parameters:
Name Type Description
style TXTextControlTypeDefinition.FontUnderlineStyle

View Source TextControlContext.js, line 744

Promise.<void>

# setForeColor(foreColor) → {Promise.<void>}

Sets the foreground color of the control which is the color of the document's text.
Parameters:
Name Type Description
foreColor string

View Source TextControlContext.js, line 752

Promise.<void>

# setFormattingPrinter(printerName)

Sets the name of a printer the text dimensions and capabilities of which are used to format the document.
Parameters:
Name Type Description
printerName string

View Source TextControlContext.js, line 759

# setFormulaReferenceStyle(style) → {Promise.<void>}

Sets a value determining how references to table cells in formulas are specified.
Parameters:
Name Type Description
style TXTextControlTypeDefinition.FormulaReferenceStyle

View Source TextControlContext.js, line 767

Promise.<void>

# setInputPositionByLocation(location) → {Promise.<void>}

Sets a new input position from a geometric location.
Parameters:
Name Type Description
location TXTextControlTypeDefinition.Point

View Source TextControlContext.js, line 775

Promise.<void>

# setInputPositionByPage(page, line, column) → {Promise.<void>}

Sets a new input position from a page, line and column number.
Parameters:
Name Type Description
page number
line number
column number

View Source TextControlContext.js, line 790

Promise.<void>

# setInputPositionByTextPosition(textPosition, textFieldPosition) → {Promise.<void>}

Sets a new input position from a text position.
Parameters:
Name Type Description
textPosition number
textFieldPosition TXTextControlTypeDefinition.TextFieldPosition

View Source TextControlContext.js, line 806

Promise.<void>

# setIsFormFieldValidationEnabled(value) → {Promise.<void>}

Sets a value indicating whether form field validation is active or not.
Parameters:
Name Type Description
value boolean

View Source TextControlContext.js, line 820

Promise.<void>

# setIsFormulaCalculationEnabled(enable) → {Promise.<void>}

Sets a value indicating whether formulas in tables are automatically calculated when the text of an input cell is changed.
Parameters:
Name Type Description
enable boolean

View Source TextControlContext.js, line 833

Promise.<void>

# setIsHyphenationEnabled(enable) → {Promise.<void>}

Sets a value indicating whether hyphenation is active or not.
Parameters:
Name Type Description
enable boolean

View Source TextControlContext.js, line 846

Promise.<void>

# setIsLanguageDetectionEnabled(enable) → {Promise.<void>}

Sets a value indicating whether language detection is active or not.
Parameters:
Name Type Description
enable boolean

View Source TextControlContext.js, line 854

Promise.<void>

# setIsSpellCheckingEnabled(enable) → {Promise.<void>}

Sets a value indicating whether spell checking is active or not.
Parameters:
Name Type Description
enable boolean

View Source TextControlContext.js, line 867

Promise.<void>

# setIsTrackChangesEnabled(value) → {Promise.<void>}

Sets a value indicating whether track changes is active or not.
Parameters:
Name Type Description
value boolean

View Source TextControlContext.js, line 875

Promise.<void>

# setLandscape(isLandscape) → {Promise.<void>}

Sets a value indicating whether the page orientation is landscape.
Parameters:
Name Type Description
isLandscape boolean

View Source TextControlContext.js, line 883

Promise.<void>

# setPageUnit(pageUnit) → {Promise.<void>}

Sets the measure used for page sizes and page margins.
Parameters:
Name Type Description
pageUnit TXTextControlTypeDefinition.MeasuringUnit

View Source TextControlContext.js, line 891

Promise.<void>

# setPermanentControlChars(permanentControlChars) → {Promise.<void>}

Sets a value indicating which control characters are shown permanently on the screen.
Parameters:
Name Type Description
permanentControlChars TXTextControlTypeDefinition.PermanentControlChar

View Source TextControlContext.js, line 899

Promise.<void>

# setRenderMode(value) → {Promise.<void>}

Sets the component render mode.
Parameters:
Name Type Description
value TXTextControlTypeDefinition.ComponentRenderMode

View Source TextControlContext.js, line 912

Promise.<void>

# setSelectObjects(selectObjects) → {Promise.<void>}

Sets a value controlling the selection of objects which are inserted behind the text.
Parameters:
Name Type Description
selectObjects boolean

View Source TextControlContext.js, line 920

Promise.<void>

# setStatusBarColor(hexColor) → {Promise.<void>}

Sets the background color of the status bar.
Parameters:
Name Type Description
hexColor string

View Source TextControlContext.js, line 928

Promise.<void>

# setText(text) → {Promise.<void>}

Sets the control's text.
Parameters:
Name Type Description
text string

View Source TextControlContext.js, line 936

Promise.<void>

# setTextBackColor(color) → {Promise.<void>}

Sets the background color for the text.
Parameters:
Name Type Description
color string

View Source TextControlContext.js, line 944

Promise.<void>

# setTextFrameMarkerLines(textFrameMarkerLines) → {Promise.<void>}

Sets whether text frames that have no border line are shown with marker lines.
Parameters:
Name Type Description
textFrameMarkerLines boolean

View Source TextControlContext.js, line 952

Promise.<void>

# setViewMode(viewMode) → {Promise.<void>}

Sets the mode how Text Control displays a document.
Parameters:
Name Type Description
viewMode TXTextControlTypeDefinition.ViewMode

View Source TextControlContext.js, line 965

Promise.<void>

# showDialog(dialogBoxKind, selectedTabopt)

Shows a built -in dialog box.
Parameters:
Name Type Attributes Description
dialogBoxKind TXTextControlTypeDefinition.DialogBoxKind The dialog box kind.
selectedTab number <optional>
Optional. The 0-based selected dialog tab.

View Source TextControlContext.js, line 973

# showHorizontalRuler(showopt)

Shows or hides the web editor's horizontal ruler bar.
Parameters:
Name Type Attributes Description
show boolean <optional>

View Source TextControlContext.js, line 980

# showHtmlDialog(dialogBoxKind)

Shows one of the a built -in HTML dialog boxes.
Parameters:
Name Type Description
dialogBoxKind TXTextControlTypeDefinition.HtmlDialogBoxKind

View Source TextControlContext.js, line 987

# showMergeFieldDialog(fieldType)

Opens a field dialog either for changing properties of an existing merge field or for creating a new merge field.
Parameters:
Name Type Description
fieldType TXTextControlTypeDefinition.FieldType

View Source TextControlContext.js, line 994

# showRibbonBar(showopt)

Shows or hides the ribbon bar.
Parameters:
Name Type Attributes Description
show boolean <optional>

View Source TextControlContext.js, line 1001

# showSideBar(sideBarType, showopt)

Shows or hides a specified side bar.
Parameters:
Name Type Attributes Description
sideBarType TXTextControlTypeDefinition.SideBarType
show boolean <optional>

View Source TextControlContext.js, line 1009

# showStatusBar(showopt)

Shows or hides the web editor's status bar.
Parameters:
Name Type Attributes Description
show boolean <optional>

View Source TextControlContext.js, line 1016

# showVerticalRuler(showopt)

Shows or hides the web editor's vertical ruler bar.
Parameters:
Name Type Attributes Description
show boolean <optional>

View Source TextControlContext.js, line 1023

# undo() → {Promise.<void>}

Undoes the last Text Control operation.

View Source TextControlContext.js, line 1030

Promise.<void>

# async untilTextControlLoaded() → {Promise.<void>}

waits until TXTextControlLoaded true

View Source TextControlContext.js, line 1125

Promise.<void>

# zoom(zoomFactor) → {Promise.<void>}

Zooms the contents of the TextControl.
Parameters:
Name Type Description
zoomFactor number | TXTextControlTypeDefinition.SpecialZoomFactor Specifies the zoom factor, in percent. This can also be one of the values of the TXTextControl.SpecialZoomFactor enumeration.

View Source TextControlContext.js, line 1038

Promise.<void>