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

undo/redo gives error

2 Answers 139 Views
Editor
This is a migrated thread and some comments may be shown as answers.
marco
Top achievements
Rank 1
marco asked on 15 Nov 2013, 05:02 PM
Hi,
I'm using kendo editor to substitute the ajax html editor in my aspx application. I believe the same I'm using now to write. 
I am using kendo 2013.2.918 version.
I need to implement the Undo/redo functionalities. Basically I added two custom buttons and a function to handle the click in the tools[] array as

                $("#editor").kendoEditor({
                    tools: [
                    ..........
                    {
                        name: "customundo",
                        tooltip: "Undo",
                        exec: function (e) {
                            var editor = $(this).data("kendoEditor");
                            editor.exec("undo");
                        }
                    },
                    {
                        name: "customredo",
                        tooltip: "Redo",
                        exec: function (e) {
                            var editor = $(this).data("kendoEditor");
                            editor.exec("redo");
                        }
                    },
 
                    ..........
                    ]

Everytime I click the undo/redo button, the method editor.exec(undo/redo) is called.
I always get an error in kendo.all.min.js as
"JSCript runtime error: object doesn't support this property or method.
in kendo.all.min.js the statement "a.undoRedoStack[e]" is highlighted.
I implemented a preliminary version this summer using version 2013.2.710 and the exec(undo) worked. I noticed also the css changed substantially between the 2 versions.
I tried kendo.web.min.js but it behaves in the same way. Can you please tell me how I can implement undo/redo ?

For completeness I attach the the aspx file

Thanks for your kind attention

best regards

Marco

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 18 Nov 2013, 11:29 AM
Hi Marco,

We discovered this problem a couple of weeks ago and it is fixed now. If you upgrade to Kendo UI Q3 2013 (due this week), it will not occur.

For an immediate fix, please rename the customredo and customundo tools, so that the "redo" and "undo" strings do not appear in the tool names.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
marco
Top achievements
Rank 1
answered on 18 Nov 2013, 01:20 PM
Thanks Dimo, I used the fix and it works.
I will download the new version and try.
Best regards
Marco
Tags
Editor
Asked by
marco
Top achievements
Rank 1
Answers by
Dimo
Telerik team
marco
Top achievements
Rank 1
Share this question
or