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

Clear undo stack?

1 Answer 179 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 24 Apr 2020, 01:44 PM

I am using kendo-editor in a component.  On loading the component (ngOnInit()), I am using Reactive Forms (this.form.setValue()) to bind a value to the editor control.  However, this triggers the undo stack so that the undo button on the control is enabled.  Pressing the undo button clears out the editor value (since it was set in ngOnInit().  

Is there any way to clear the undo stack after I set the initial value in the editor/form so that I am unable to Undo the initial change (which isn't really a change)?

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 28 Apr 2020, 07:19 AM

Hi Tim,

I tested the described behavior by adjusting the example from our documentation that shows how to use the Editor with Reactive Forms. But on my side the Undo button is disabled when I set the value in ngOnInit hook, check the following StackBlitz:

https://stackblitz.com/edit/angular-bfkefn?file=app/app.component.ts

Please could you modify the example in a way that is used in your application, or share some code snippets of the markup so that we can understand better the scenario and be able to provide more suitable assistance on this case. Thank you in advance.

We are looking forward to your reply.

Regards,
Martin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Editor
Asked by
Tim
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or