TXTextControlWeb.appendDocument Method

Appends text in a certain format to the current document.

Syntax

[JavaScript]
<void> TXTextControlWeb.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 widget.

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