This is a migrated thread and some comments may be shown as answers.

Current Functionality

6 Answers 263 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Scott Michetti
Top achievements
Rank 1
Scott Michetti asked on 21 Feb 2019, 09:53 PM

     Hello, I have a few questions regarding the current state of the Editor.

1. Is there an option to edit the font, font size, fore color, and back color? Can this be done with a directive?

2. How do I get the instance of the editor so I can call various methods like editor.exec('setHTML', '<p>HTML content</p>')?

3. Is there a way to insert text at the current cursor location?

Thanks,

Scott

6 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 22 Feb 2019, 10:23 AM
Hi Scott,

1. Is there an option to edit the font, font size, fore color, and back color? Can this be done with a directive?

The implementation of this features is currently in progress. We'll release the font type and font size tools in a short period of time. The fore and background color tools are planned for the end of Q1 2019.

2. How do I get the instance of the editor so I can call various methods like editor.exec('setHTML', '<p>HTML content</p>')?

Just like you get the instance of every other Kendo Angular component. Here's a quick example:

import { Component, ViewChild } from '@angular/core';
import { EditorComponent } from '@progress/kendo-angular-editor';
 
@Component({
    selector: 'my-app',
    template: `
        <button (click)="setHTML()">Button</button>
        <kendo-editor #editor [value]="value"></kendo-editor>
    `
})
export class AppComponent {
    @ViewChild('editor') public editor: EditorComponent;
 
    public value: string = `
        <p>initial</p>
    `;
 
    public setHTML(): void {
      this.editor.exec('setHTML', '<p>foo</p>');
    }
}

3. Is there a way to insert text at the current cursor location?

Currently the API provides only setHTML command, which replaces the whole content.
Adding an insertText command is part of the short term tasks list.

Regards,
Alexander Valchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Scott Michetti
Top achievements
Rank 1
answered on 22 Feb 2019, 02:44 PM
Thank you Alexander, I think for now I will have to use the JQuery version inside my Angular application until the Angular version is complete. Hopefully that will work.
0
Svet
Telerik team
answered on 26 Feb 2019, 02:21 PM
Hi Scott,

Indeed, we can use any of the Kendo Ui for jQuery widgets inside an Angular application until a counterpart Kendo Ui for Angular component is officially released.

Let us know in case any further assistance is required for Kendo Ui for Angular.

Regards,
Svetlin
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Paul
Top achievements
Rank 1
answered on 31 Mar 2019, 12:57 PM
Any idea when the insertText functionality is due for release?
0
Svet
Telerik team
answered on 02 Apr 2019, 10:51 AM
Hi Paul,

I consulted with the assigned developer. An estimated time of delivery for the requested feature is the end of April.

Regards,
Svetlin
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Paul
Top achievements
Rank 1
answered on 02 Apr 2019, 10:53 AM
Thanks for letting me know
Tags
Editor
Asked by
Scott Michetti
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Scott Michetti
Top achievements
Rank 1
Svet
Telerik team
Paul
Top achievements
Rank 1
Share this question
or