I am having issues when trying to combine these two widgets in an application.
The process I want is for a user to be able to:
1) Launch a kendo window
2) FROM the kendo window launch a second kendo window (using custom action) that contains a kendo editor
HTML snippets:
JavaScript:
However depending on the order of the editor and window declarations and the placement of the div that contains the editor (#editorPort) either of the following occurs:
1) Inline editor - Toolbar is corrupted and buttons displayed one below the other. Edit are works (e.g. contenteditable)
2) outline editor - Toolbar is fine however editor is not well editable. (by outline I mean that the #editorPort is placed outside of #viewPort in the DOM).
Any thoughts/comments?
Thanks,
Mark.
The process I want is for a user to be able to:
1) Launch a kendo window
2) FROM the kendo window launch a second kendo window (using custom action) that contains a kendo editor
HTML snippets:
<
div
id
=
"viewPort"
><
br
><
div
id
=
"viewPortTools"
><
input
id
=
"zoomSlider"
/></
div
><
br
><
div
id
=
"viewer"
><
br
><
img
id
=
"viewImg"
style
=
"zoom: 1.0"
alt
=
"graphic"
src
=
"http://localhost:1334/GetCachedImage.aspx?GUID=8954aa7f-dfd4-4273-945e-03b0f2a6dee9"
/><
br
><
div
id
=
"editorPort"
><
div
><
textarea
id
=
"editor"
rows
=
"10"
cols
=
"40"
></
textarea
></
div
></
div
><
br
></
div
>
JavaScript:
$(document).ready(function () {
var viewport = $("#viewPort").kendoWindow({
actions: ["Custom", "Refresh", "Maximize", "Minimize", "Close"],
draggable: false,
visible: false,
height: "95%",
width: "95%",
modal: true,
resizable: false,
title: "ViewPort"
}).data("kendoWindow").wrapper.find(".k-custom").click(function (e) {
console.log(e);
var editport = $("#editorPort").data("kendoWindow");
editport.center();
var editor = $("#editor")
editport.open();
e.preventDefault();
});
//Configure editor used for annotations inside popup modal window.
$("#editor").kendoEditor({
tools: [
"bold",
"italic",
"underline",
"foreColor"
]
});
//Configure editor popup window used by editor
var editport = $("#editorPort").kendoWindow({
actions: ["Close"],
draggable: true,
visible: false,
height: "200px",
modal: false,
resizable: false,
title: "Editor Full Window",
width: "400px"
}).data("kendoWindow");
//Placeholder function to test viewPort
$("#folderTitle").click(function () {
var viewport = $("#viewPort").data("kendoWindow");
viewport.center();
viewport.open();
});
});
var viewport = $("#viewPort").kendoWindow({
actions: ["Custom", "Refresh", "Maximize", "Minimize", "Close"],
draggable: false,
visible: false,
height: "95%",
width: "95%",
modal: true,
resizable: false,
title: "ViewPort"
}).data("kendoWindow").wrapper.find(".k-custom").click(function (e) {
console.log(e);
var editport = $("#editorPort").data("kendoWindow");
editport.center();
var editor = $("#editor")
editport.open();
e.preventDefault();
});
//Configure editor used for annotations inside popup modal window.
$("#editor").kendoEditor({
tools: [
"bold",
"italic",
"underline",
"foreColor"
]
});
//Configure editor popup window used by editor
var editport = $("#editorPort").kendoWindow({
actions: ["Close"],
draggable: true,
visible: false,
height: "200px",
modal: false,
resizable: false,
title: "Editor Full Window",
width: "400px"
}).data("kendoWindow");
//Placeholder function to test viewPort
$("#folderTitle").click(function () {
var viewport = $("#viewPort").data("kendoWindow");
viewport.center();
viewport.open();
});
});
However depending on the order of the editor and window declarations and the placement of the div that contains the editor (#editorPort) either of the following occurs:
1) Inline editor - Toolbar is corrupted and buttons displayed one below the other. Edit are works (e.g. contenteditable)
2) outline editor - Toolbar is fine however editor is not well editable. (by outline I mean that the #editorPort is placed outside of #viewPort in the DOM).
Any thoughts/comments?
Thanks,
Mark.