How to check coordinates of current User Selection?

Hello, I noticed the Container.DocumentEditor.SelectAsync method takes a SelectionSettings object which has an X and Y double parameter. I was curious how I can get the X and Y coordinates of the user's current selection so I track which  part of the document the user has their cursor or selection in and apply special logic accordingly.


1 Reply

SM Suriya Murugan Syncfusion Team April 19, 2022 02:52 PM UTC

Hi Riley,


Apologies!


We are sorry to say that we dont have public API to get the X and Y coordinates based on current selection.


You can make selection based on offset. Please check below documentation link which is in typescript for reference:

https://ej2.syncfusion.com/documentation/document-editor/how-to/move-selection-to-specific-position/#selects-content-based-on-start-and-end-hierarchical-index



Please let us know if you need any further assistance.


Regards,

Suriya M.


Loader.
Up arrow icon