InlineStyleCollection Object
Description
Contains all formatting styles in a Text Control document or part of the document.
Syntax
InlineStyleCollectionExamples
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
| Method | Description |
|---|---|
| add | Adds a new style to the current document. |
| getItem | Gets a style from the collection by the style's name. |
| remove | Removes a formatting style from the collection. (Inherited from FormattingStyleCollection.) |