Javascript: InlineStyle.resetToParagraph Method
Description
Resets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph.
Syntax
<void> InlineStyle.resetToParagraph(<InlineStyle.Attributes> attributes, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| attributes | Specifies one or more attributes. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates InlineStyle.resetToParagraph in a practical document-editing workflow. Resets one or more of the style's attributes to its default value which is the same value as defined for the surrounding paragraph.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function resetToParagraph(inlineStyle, attributes) {
inlineStyle.resetToParagraph(attributes, onTxError);
}