The Elm interface to the text-area-tracker custom element.
This code won't do anything unless site/js/text-area-tracker.js is loaded.
The caretCoordinates property of a Coordinates type.
The value for the onSelection event.
Create a code editor Html element.
This is how you set the id of the tracked text-area element.
This is how you trigger the event for the caret coordinates.
This is how you trigger the event for the caret coordinates.
This is how you receive the caret selection and coordinates.
This is how you receive the selection start and end.
This sends a subset of the onCaretCoordinates information. If you want only the selection, and not the screen coordinates, it is faster to compute.
Decoder for the Coordinates type.
Decoder for the CaretCoordinates type.
Decoder for the Selection type.
The value for the
onCoordinatesevent.