4 Answers, 1 is accepted
Hi Ganzimaro,
Here is a sample StackBlitz demonstrating the desired behaviour - https://stackblitz.com/edit/angular-w6svqx?file=app/app.component.ts
There are two key points here:
- We have to create a template reference variable for the <kendo-editor> like so:
<kendo-editor #editor> </kendo-editor>
- Use an existing toolbar tool or a custom one and execute an editor command(using the exec method) on click like this:
<kendo-toolbar> <kendo-toolbar-button text="Bold button" (click)="editor.exec('bold');"> </kendo-toolbar-button> </kendo-toolbar>
A full list of the supported editor commands can be found here - https://www.telerik.com/kendo-angular-ui/components/editor/api/EditorCommand/
More info on how to implement custom editor tools can be found here - https://www.telerik.com/kendo-angular-ui/components/editor/tools/#toc-custom-tools
I hope this helps. Please let me know if further assistance is needed.
Regards,
Petar
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.

text: <p>test text 1</p>
result: <p>test <key>text</key> 1</p>

Hello Ganzimaro,
Thanks for the provided details. I will try to answer the questions in the order they have been asked:
- If my understanding is correct, the goal is to insert a custom tag inside the Editor. This however is not supported at the moment and there is no workaround with the current API. It is important to note that when the Editor encounters an unsupported tag(which is set through the [value] input or otherwise), this tag is removed along with all of its contents.
- Currently the Editor does not provide any way of retrieving the cursor position. However based on this StackOverflow thread I have created a sample StackBlitz app which shows how to get the cursor position - https://stackblitz.com/edit/angular-rfudnb?file=app/app.component.ts.
If having any of these features as built-in is important for you, please consider submitting a feature request on our Feedback Portal:
https://feedback.telerik.com/kendo-angular-ui
We keep a close eye on it as it is one of our main indicators on what is in high demand. When a feature is highly requested, we adjust our priorities and work accordingly so it gets developed faster.
I hope this helps. Please let me know if further assistance is needed.
Regards,
Petar
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.