TX Text Control .NET Server

InlineStyleCollection Object

Object|Introduced in 28.0

Description

Contains all formatting styles in a Text Control document or part of the document.

Syntax

InlineStyleCollection

Examples

The following example demonstrates InlineStyleCollection in a practical document-editing workflow. It contains all formatting styles in a Text Control document or part of the document.

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

TXTextControl.inlineStyles.getItem(
    "Heading 1",
    function(style) {
        if (!style) {
            console.warn("No inline style was returned.");
            return;
        }
        
        console.log("get item result:", style);
    },
    onTxError
);

Members

Methods

MethodDescription
addAdds a new style to the current document.
getItemGets a style from the collection by the style's name.
removeRemoves a formatting style from the collection. (Inherited from FormattingStyleCollection.)