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

Availability of API to get selected text

In the Blazor RichTextEditor control, I need to get the contents, both formatted and plain-text, of the current selection. The Blazor RTE doesn't have this API, but I can see that the API does exist in the plain JS RTE. So the question would be - do you plan to expose this API in the Blazor RTE? Also, I assume that the Blazor RTE is just wrapping the JS one. If that's the case, could you advise on steps to manually invoke this API from outside the wrapper? Thank you!


2 Replies

PM Pandiyaraj Muniyandi Syncfusion Team November 28, 2019 05:48 PM UTC

Hi Loic, 
 
Greetings from Syncfusion support. 
  
In your query shared our documentation link is explain the EJ1 RichTextEditor control functionality. But in Blazor, we used EJ2 pure javascript source to render the RTE component. We have GetSelection() public method in RichTextEditor component to get the plain text from the current selection range in the editor. 
  
  
Currently, we doesn’t have methods to get the formatted text from the selection range. We will consider Provide option to get the formatted text from the current selection in RichTextEditoras improvement from our end.  This changes  will be included in our 2019 Volume 4 SP1 which is tentatively planned to roll-out around end of January 2020. 
  
You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link: https://www.syncfusion.com/feedback/10484/ 
 
Regards, 
Pandiyaraj 



IS Indrajith Srinivasan Syncfusion Team January 31, 2020 11:06 AM UTC

Hi Loic, 
 
We are glad to announce that our Essential Studio Volume 4, 2019 service pack release (v17.4.0.46) is rolled out and is available for download under the following link. And the support for Provide option to get the formatted text from the current selection in RichTextEditoris included. You can now get the selected HTML using the method GetSelectedHtml.

API link:
https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.RichTextEditor.SfRichTextEditor.html#Syncfusion_Blazor_RichTextEditor_SfRichTextEditor_GetSelectedHtml 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Indrajith 


Loader.
Up arrow icon