InputPosition Object
Description
Represents the current text input position of a document.
Syntax
InputPositionExamples
The following example demonstrates InputPosition in a practical document-editing workflow. It represents the current text input position of a document.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.inputPosition.getCaretSize(
function(size) {
if (!size) {
console.warn("No size was returned.");
return;
}
console.log("get caret size result:", size);
},
onTxError
);Members
Methods
| Method | Description |
|---|---|
| getCaretSize | Gets the size of the caret, in pixels, at the current text input position. |
| getColumn | Gets the column number of the current text input position. |
| getInactiveMarker | Gets whether the current text input position when the TextControl is inactive and the blinking caret is not visible. |
| getLine | Gets the line number of the current text input position. |
| getLocation | Gets the geometric location of the current text input position. |
| getPage | Gets the page number of the current text input position. |
| getPageInSection | Gets the page number in the section containing the current text input position. |
| getSection | Gets the section number of the current text input position. |
| getTextPosition | Gets the text position of the current text input position. |
| scrollTo | Scrolls the contents of a Text Control so that the current input position becomes visible. |
| setInactiveMarker | Sets whether the current text input position when the TextControl is inactive and the blinking caret is not visible. |
Enumerations
| Enumeration | Description |
|---|---|
| ScrollPosition | Determines a position to where the input position is scrolled. |