Ok so a bit of a difficult issue, but most likely possible to implement. What I am trying to is to implement a text cursor which on drag of the mouse cursor, can show where the position of the text cursor/object/range expected position when the drag ends.
Best way to understand this might just be to see a demo(A clean demo of close to what I am trying to reproduce, expect I would use the object, in this case the image as the cursor which is being dragged):
Another demo, it is not as clean, but in the case the image is used rather than the curser in the first case:
A very simple implementation can easily be made using a
ViewPlugin, and replace/widget decoration where I can implement some sort of drag
eventHandler, and use
posAtCoords to change the position of the widget where drag ends, simple and easy.
But I would like to see the text curser/widget position if the drag ended without the drag ending, just exactly like the first video, I don’t really know how would I go about this.
My best guess on how I may go about it would be to make a virtual/duplicate widget, and actually moving it depending on where the curser is, but then also telling the editor that it is not something to record in the history, I have no ideas how would I go about this. Some guidance, would be very helpful.