Javascript: TXTextControl.appendDocument Method

Appends text in a certain format to the current document.

Introduced: 25.0.

Syntax

[JavaScript]
<void> TXTextControl.appendDocument(<StreamType> streamType, <string> base64Data);
Parameter Description
streamType

Specifies one of the numerical StreamType values.

base64Data

Base64 encoded document data.

Example

The following example shows how to append a short HTML snippet to the current document in the web editor.

[JavaScript]
var html = "This is some <b>HTML</b> text.";
var encoded = btoa(html);  // btoa base-64-encodes strings.
TXTextControl.appendDocument(TXTextControl.StreamType.HTMLFormat, encoded);

See Also