Doc kit command
presence.locate
Locate Carets
Answers page positions for given object-model caret positions, for drawing collaborators' carets.
- Kit
- Doc 0.1.0 (.docx)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
places | object[] | no | [{"caret": {object, field, offset}, "anchor"?: {object, field, offset}}] |
Call through doc_run
text
doc_run {
"path": "<file>.docx",
"steps": [{ "command": "presence.locate" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: places. doc_run answers the step’s result in completed[i].result.
Result
Result JSON Schema
json
{
"type": "array"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"places": {
"description": "[{\"caret\": {object, field, offset}, \"anchor\"?: {object, field, offset}}]",
"items": {
"additionalProperties": true,
"properties": {
"anchor": {
"additionalProperties": true,
"description": "{object, field, offset}",
"properties": {
"field": {},
"object": {},
"offset": {
"type": "number"
}
},
"type": "object"
},
"caret": {
"additionalProperties": true,
"description": "{object, field, offset}",
"properties": {
"field": {},
"object": {},
"offset": {
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"returns": "[{caret: {page, x, y, height} | null, rects: [{page, x, y, width, height}]}] (each person's caret and selection in this view, in page points; null and [] for what this view does not show)",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (doc_commands through @kition/[email protected], built from KitionAI/kition-doc@41e14a8). As data: commands.jsonl.