Obsolete. This method will be removed in one of the next versions. Loads text in a certain format into the current selection.
Introduced: X13.
<void> TXTextControl.loadSelection(<StreamType> streamType, <string> base64Data)
Parameter | Description |
---|---|
stream |
Specifies one of the numerical Stream |
base64Data | Base64 encoded document data. |
The following example shows how to load a short HTML document into the web editor.
var html = "This is some <b>HTML</b> text.";
var encoded = btoa(html); // btoa base-64-encodes strings.
TXTextControl.loadDocument(TXTextControl.StreamType.HTMLFormat, encoded);
Learn more about the Javascript: TXText