TX Text Control .NET Server

Javascript: TXTextControl.loadJsonData Method

Method|Introduced in 26.0

Description

Loads JSON data which is used to create table and field name menu items in the mailings ribbon tab.

Syntax

<void> TXTextControl.loadJsonData(<string> jsonData, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
jsonData

Specifies the JSON content which is used as a database.

callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates TXTextControl.loadJsonData in a practical document-editing workflow. It loads JSON data which is used to create table and field name menu items in the mailings ribbon tab.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.loadJsonData(
    "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgAH/qbPzWQAAAABJRU5ErkJggg==",
    function() {
        console.log("load json data completed.");
    },
    onTxError
);

Further Reading

  • Angular: Loading Excerpt JSON Data on Initializing TX Text Control –