Follow along with the runnable example. This guide walks through the Dictation box example in
corti-examples — bootstrap your build from it or use it as reference.EditorAdapter, and the Commands declare → event → dispatch loop. The new idea is routing — deciding which control each dictation segment lands in.
The commands
The workflow is driven by a small command set: two to control routing, one to transfer, and two to navigate the form.JavaScript
Route dictation to the right target
By default, final dictation inserts at the caret of whatever control is focused — exactly like typing. The one exception is the box-target override: aftertarget dictation box, dictation goes into the scratch box while the form field keeps its focus and caret.
JavaScript
transfer text work, track the last-active field that isn’t the box — that’s the transfer destination. A focusin listener records it, and focusing any field clears the override.
JavaScript
Transfer the box into a field
transfer text inserts the box’s contents at the caret of the last-active field — reusing the same boundary-aware insert — then clears the box and the override.
JavaScript
Navigate the form by voice
go to {field} focuses a text field (caret to end) or opens a dropdown. pick {number} selects an option — parse the spoken value so both "two" and "2" resolve to the same 1-based index.
JavaScript
A native
<select> can’t be opened or selected-by-index programmatically, so dropdown fields need a custom listbox (a button + option list) exposing an imperative open/pick handle. Text fields work directly through the EditorAdapter.Next steps
Text Insertion
The caret-insertion
EditorAdapter that box and field writes reuse.App Control
Drive non-text UI — tabs, panels, dialogs — by voice.
Example code
The complete, runnable Dictation box example in
corti-examples.Please contact us for help or questions.