SubTextPartEventArgs Object
Description
The event argument object for SubTextPart related events. (e. g. the subTextPartEntered event)
Syntax
{
id: <number>,
start: <number>,
length: <number>,
name: <string>,
number: <number>,
nestedLevel: <number>
}Examples
The following example demonstrates SubTextPartEventArgs in a practical document-editing workflow. The event argument object for SubTextPart related events. (e. g. the subTextPartEntered event).
function handleSubTextPart(args) {
console.log("id:", args.id);
console.log("start:", args.start);
console.log("length:", args.length);
console.log("name:", args.name);
}Members
Properties
| Property | Description |
|---|---|
| id | The subtextpart's identifier. Must be a one-based value. A value of zero indicates that the subtextpart has no identifier. |
| length | The length of the SubTextPart in characters. |
| name | The name of the subtextpart. An empty string indicates that the subtextpart has no name. |
| nestedLevel | The subtextpart's nested level. The top level is 1. |
| number | The subtextpart's number. The first subtextpart has the number 1. The number is defined through the textflow. A textpart with a smaller start position has a smaller number. When an outer subtextpart has the same start position than one of its nested textparts the outer textpart has a smaller number. |
| start | The 1-based position of the first character which belongs to the subtextpart. |