Loads text in a certain format. The complete contents of the web editor are replaced.
[JavaScript] <void> TXTextControlWeb.loadDocument(<StreamType> streamType, <string> base64Data);
Parameter | Description | |
streamType |
Specifies one of the numerical StreamType values. |
|
base64Data |
Base64 encoded document data. |
The following example shows how to load a short HTML document into the web editor.
[JavaScript] var html = "This is some <b>HTML</b> text."; var encoded = btoa(html); // btoa base-64-encodes strings. TXTextControlWeb.loadDocument(TXTextControl.StreamType.HTMLFormat, encoded);