DS Server

Javascript: FormattingStyle.setForeColor Method

Method|Introduced in 28.0

Description

Sets the style's color used to display the text.

Syntax

<void> FormattingStyle.setForeColor(<String> color, <EmptyRequestCallback> callback)

Parameters

ParameterDescription
color

The style's color used to display the text.

callback

Is called when the operation completed.

Examples

The following example demonstrates FormattingStyle.setForeColor in a practical document-editing workflow. It sets the style's color used to display the text.

function configureForeColor(formattingStyle) {
    formattingStyle.setForeColor(
        "#ffd54f",
        function() {
            console.log("set fore color completed.");
        }
    );
}