Javascript: InlineStyle.Attributes Enumeration
Description
Determines the style's attributes.
Members
| Member | Description |
|---|---|
| FontName | Specifies the attribute set through the style's FontName property. |
| FontSize | Specifies the attribute set through the style's FontSize property. |
| Bold | Specifies the attribute set through the style's Bold property. |
| Italic | Specifies the attribute set through the style's Italic property. |
| Underline | Specifies the attribute set through the style's Underline property. |
| Strikeout | Specifies the attribute set through the style's Strikeout property. |
| Baseline | Specifies the attribute set through the style's Baseline property. |
| ForeColor | Specifies the attribute set through the style's ForeColor property. |
| TextBackColor | Specifies 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
);
}