How to get the cursor position in Blazor DocumentEditor

Good day,

For our project we need the possibility to get the cursor position of a marked text in the Blazor DocumentEditor.

We need to tell the backend via our API the cursor position and the marked text to be able to manipulate the text on the backend side.

I have only found out that it is possible to get the string of the marked text via DocumentEditor.Selection.GetTextAsync() but I have not found a way to get the cursor position to find the text uniquely in the backend.



I would appreciate a positive answer.


1 Reply

SM Suriya Murugan Syncfusion Team September 8, 2022 01:18 PM UTC

Hi Tobias,


We are sorry to say that it is not possible to get the cursor position using syncfusion Document editor.  You can add bookmark for the needed content and retrieve the content inbetween content of bookmark using Syncfusion Document editor, it may helpful to achieve your requirement.

https://blazor.syncfusion.com/documentation/document-editor/how-to/retrieve-the-bookmark-content-as-text

Please let us know if you need any further assistance.


Regards,

Suriya M.


Loader.
Up arrow icon