Appends text in a certain format to the current document.
Introduced: X15.
<void> TXTextControl.appendDocument(<StreamType> streamType, <string> base64Data)
Parameter | Description |
---|---|
stream |
Specifies one of the numerical Stream |
base64Data | Base64 encoded document data. For encoding strings containing characters outside of the Latin1 range use TXText |
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);