How to insert html content for a specific caret position into the editor?

1 Answer 160 Views
Editor General Discussions
Pawel
Top achievements
Rank 1
Pawel asked on 04 Jul 2022, 10:53 AM

Hello everyone,

I need to insert html code at the current caret position - is this possible, and if so, could someone suggest how to do it? I've seen a similar solution in angular, but I can't convert it to this in react.

(https://stackblitz.com/edit/angular-fway1h-7ydfj2?file=app%2Fapp.component.ts)

Additionally:

Is it possible to calculate the exact position of the caret with respect to the entire browser window? 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 05 Jul 2022, 02:45 PM

Hello Pawel,

The found angular approach can be implemented in the KendoReact Editor as well following the approach from this KB:

https://www.telerik.com/kendo-react-ui/knowledge-base/add-custom-tools-to-the-editor-and-customize-built-in-tools/

Give it a try and let me know if it fits your needs or I can help you further on this matter.

Regards,
Vessy
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Editor General Discussions
Asked by
Pawel
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or