[Feature Request] Provide (x, y) coordinates
marcospassos opened this issue · comments
Marcos Passos commented
A very common use case is detecting the cursor coordinates on the screen to render auto-suggestion. Would you consider exposing a method to get the coordinates? Something like Edit.getSelection(): Range
.
Also, do you know any autosuggestion dropdown examples out there?
Phil Pluckthun commented
Every onChange
gives you a Position
object for this purpose and the getState
method computes the same.
The only example of suggestions I've made can be found here: https://github.com/FormidableLabs/trygql/tree/main/page/src/editor