We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to get left position of Selection Text

Dear

I use this code to select text on document editor

this.container.documentEditor.selection.select(startOffset, endOffset)


After that, i want to get the LEFT POSITION (x) of selection text, please help me to do that.


Thanks




1 Reply

KM Kavitha Muralitharan Syncfusion Team March 1, 2023 02:11 PM UTC

Hi Linh,


We suggest you use the below code to get the X position of the selected text.

this.container.documentEditor.selection.select(startOffset, endOffset);

this.container.documentEditor.selection.start.location.x;


Please let us know if you need any further assistance


Regards,

Kavitha M


Loader.
Live Chat Icon For mobile
Up arrow icon