Javascript: ParagraphStyle.getFollowingStyle Method
Description
Gets the name of the style that the document automatically uses for the following paragraph after the user has pressed the ENTER key.
Syntax
<void> ParagraphStyle.getFollowingStyle(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the name of the style that TextControl automatically selects for the following paragraph after the user has pressed the ENTER key. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates ParagraphStyle.getFollowingStyle in a practical document-editing workflow. It gets the name of the style that the document automatically uses for the following paragraph after the user has pressed the ENTER key.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectFollowingStyle(paragraphStyle) {
paragraphStyle.getFollowingStyle(
function(result) {
console.log("get following style result:", result);
},
onTxError
);
}