// retrieve the Editor widget object
var editor = $("#editor").data("kendoEditor");
// attach a click handler on the tool button, which opens the ImageBrowser dialog
editor.toolbar.element.find(".k-i-image").parent().click(function () {
// a setTimeout is required, otherwise the ImageBrowser widget will still not be initialized
setTimeout(function () {
// retrieve the ImageBrowser widget object
var imageBrowser = $(".k-imagebrowser").data("kendoImageBrowser");
console.log(imageBrowser);
// retrieve the ListView widget object
var listView = imageBrowser.listView;
console.log(listView);
// order the image list by directory first and then by file name
listView.dataSource.sort({
field: "type", dir: "asc", compare: function (a, b) {
if (a.type!=b.type) {
return (a.type > b.type) ? 1 : -1;
}
else {
return a.name === b.name ? 0 : (a.name > b.name) ? 1 : -1;
}
}
});
});
Hi Team,
I would like to request the UI for ASP.NET MVC Editor's ImageBrowser include a schema similar to the Kendo UI for jQuery version to describe the raw data format. This would additionally help the transition from the JavaScript version to the MVC version.
Thank you!
I'm looking for the ability to track changes from the editor. I see the feature exists in the Ajax version of the controls:
https://demos.telerik.com/aspnet-ajax/editor/examples/trackchanges/defaultcs.aspx
In Word the user can resize the first and the last column of a table. When the outer borders of a table are hovered, a resize handle appears and the user can drag it left or right, to resize the respective column.
Currently, in the Editor this is not possible. The user can resize the first column only through its right border, and the last column, only through its left border. Resize handles do not appear for the outer borders. There are handles that appear when you focus the table, but they are used to resize the whole table.
It would be nice, if the column resizing functionality Word has can be implemented in the Editor.
The tables within the Editor are not exported correctly (do not fit in the exported pdf document) when resized before exporting.
The table does not fit in the exported document.
The table should fit in the document.
I want to tool inside Kendo Editor, when on click of any Image / Video it should open a inline editor in which i can perform following functions,
1. Replace
2. Change Alignment
3. Change Captions
4. Alternate Text
5. Resize
Here are the few sample links which i am refering too (you need to click on image for getting the image editor),
https://ckeditor.com/docs/ckeditor5/latest/examples/builds/classic-editor.html
It would be nice if the MVC Definition of the Editor HtmlHelper (ImageBrowser and FileBrowser) provides the Path setting as demonstrated for the Kendo UI variation:
https://docs.telerik.com/kendo-ui/api/javascript/ui/editor/configuration/imagebrowser.path
Dojo example.
if (value == 1) { text += "<h2>Apple</h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br><br>>> APPLE Deutschland</a>";
if (value == 1) { text += "<h2>Apple</h2>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br><br>>> APPLE Deutschland</a>";
A js exception is thrown after this content is loaded in the div below the Editor, because of the line break after:
if (value == 1) { text += "<h2>Apple</h2>
The viewHtml modifies the content of script tags, which causes js logic to become invalid.
The viewHtml tool should not make changes to the content of script tags.
When a table is created through the table wizard and cellspacing is set to 0, this value is ignored and the table is created with no cellspacing value. 0 is a valid value and it affects the appearance of the table, so it should not be equivalent to not setting cellspacing.
Reproducible in the demos.
The table has no cellspacing attribute.
The table has cellspacing set to 0.
Hello there,
I'm trying to use both snippets (to make a shortcode for our users to add templated Links) and pasteCleanup option (to prevent any style to be import from a copy paste) but it seems like the pasteCleanUp option is preventing my html tags from snippets to be added.
Here my code :
@(Html.Kendo().Editor()
.Name(ViewData.TemplateInfo.HtmlFieldPrefix)
.HtmlAttributes(new { style = ViewData["style"], @class = ViewData["class"] })
.Resizable(resizable => resizable.Content(true).Toolbar(true))
.Value(@Model)
.Encode(false)
.PasteCleanup(paste => paste.All(true))
.Tools(tools => tools
.Clear()
.Bold().Italic().Underline().Strikethrough()
.JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
.CreateLink().Unlink()
.TableEditing()
.Snippets(snippets =>
{
snippets.Add("Test", " <a class='testclass' href='www.test.com'>TestLink</a> ");
})
.FontColor().BackColor()
.CleanFormatting()
.ViewHtml()
)
If I don't remove the line
.PasteCleanup(paste => paste.All(true))
All I can get from my snippet is "TestLink" instead of "
<a class='testclass' href='www.test.com'>TestLink</a>
But maybe i'm doing this wrong ?
Thx a lot.
Cordialy
I recently added the editor's table insert/edit feature to a project. My customer immediately showed frustration that you can only apply styles and classes to the entire table or one cell at a time.
It would be great if we could:
Thanks!
Hello,
On MAC, command+c cut instead of copy when selected texts are in a table. To duplicate, please follow these steps.
1. Go here: https://demos.telerik.com/aspnet-mvc/editor
2. Insert a new table.
3. Add some text into the table.
4. Select texts in the table.
5. Press command+c on MAC.
Please advise.
Thank you.
We are using the Kendo Editor control and need to take actions based on the onChange event firing. We have found that some formatting changes, such as changing the column width in a table doesn't trigger the onChange event.
Is there a work around for this issue. It can be reproduced using your editor event demo here