Javascript: SectionFormat.setBreakKind Method
Description
Sets the kind of the section break the section starts with.
Syntax
<void> SectionFormat.setBreakKind(<SectionBreakKind> breakKind, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| breakKind | The kind of the section break the section starts with. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates SectionFormat.setBreakKind in a practical document-editing workflow. It sets the kind of the section break the section starts with.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureBreakKind(sectionFormat) {
sectionFormat.setBreakKind(
TXTextControl.SectionBreakKind.BeginAtNewLine,
function() {
console.log("set break kind completed.");
},
onTxError
);
}