TX Text Control .NET Server

Javascript: ListFormat.setFontName Method

Method|Introduced in 28.0

Description

Sets the font used for the bullet character.

Syntax

<void> ListFormat.setFontName(<string> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
value

The font used for the bullet character.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

The following example demonstrates ListFormat.setFontName in a practical document-editing workflow. It sets the font used for the bullet character.

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

TXTextControl.listFormat.setFontName(
    "Arial",
    function() {
        console.log("set font name completed.");
    },
    onTxError
);