DS Server

Javascript: Selection.getStrikeout Method

Method|Introduced in 26.0

Description

Gets the strikeout attribute of the selected text.

Syntax

<void> Selection.getStrikeout(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the strikeout attribute of the selected text.

errorCallback

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

Examples

The following example demonstrates Selection.getStrikeout in a practical document-editing workflow. It gets the strikeout attribute of the selected text.

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

TXTextControl.selection.getStrikeout(
    function(result) {
        if (result) {
            console.log("get strikeout is available.");
        } else {
            console.warn("get strikeout is not available in the current document state.");
        }
    },
    onTxError
);