Appends text in a certain format to the current document.

Introduced: X15.

<void> TXTextControl.appendDocument(<StreamType> streamType, <string> base64Data)


Parameter Description
streamType Specifies one of the numerical StreamType values.
base64Data Base64 encoded document data. For encoding strings containing characters outside of the Latin1 range use TXTextControl.btoaUTF8.


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

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