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

The use of "Kendo Controls in the content editor

1 Answer 67 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Alexey Shkuro
Top achievements
Rank 1
Alexey Shkuro asked on 04 Aug 2014, 03:25 PM
Hello.

I want to insert one of Kendo Controls in the content editor.
For Example, DatePicker
I use the following code:

var editor = $("#editor").data("kendoEditor");
var elementHtml = "<input id='dtp' />";
editor.exec("inserthtml", { value: elementHtml });

Then executes the code for the DatePicker:

var dtp = $(editor.body).find("[id='dtp']");
dtp.kendoDatePicker({ animation: false });

But only displays the input field itself DatePicker is not loaded.

Tell me, what is wrong.

Thanks in advance.
Regards,
Alexey.

P.S. If I use the insert simple elements (like a button or a text box), everything is displayed correctly.

1 Answer, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 05 Aug 2014, 06:42 AM
Hello Alexey,

I'm afraid that this scenario is not officially supported and may yield strange behavior in either the editor or the inserted widgets. If you decide to proceed, make sure that you include the widget CSS within the editor iframe via the stylesheets configuration option.

Regards,
Alex Gyoshev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Alexey Shkuro
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or