DS Server

Javascript: InlineStyle.Attributes Enumeration

Enumeration|Introduced in 28.0

Description

Determines the style's attributes.

Members

MemberDescription
FontNameSpecifies the attribute set through the style's FontName property.
FontSizeSpecifies the attribute set through the style's FontSize property.
BoldSpecifies the attribute set through the style's Bold property.
ItalicSpecifies the attribute set through the style's Italic property.
UnderlineSpecifies the attribute set through the style's Underline property.
StrikeoutSpecifies the attribute set through the style's Strikeout property.
BaselineSpecifies the attribute set through the style's Baseline property.
ForeColorSpecifies the attribute set through the style's ForeColor property.
TextBackColorSpecifies the attribute set through the style's TextBackColor property.

Examples

The following example uses TXTextControl.Inlinestyle.Attributes.FontName (specifies the attribute set through the style's FontName property.) in a document-editing workflow.

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

function applyAttributes(inlineStyle) {
    inlineStyle.isInheritedFromParagraph(
        TXTextControl.Inlinestyle.Attributes.FontName,
        function(result) {
            if (result) {
                console.log("is inherited from paragraph is available.");
            } else {
                console.warn("is inherited from paragraph is not available in the current document state.");
            }
        },
        onTxError
    );
}

Further Reading