### Bug report
A non-breaking space is added at the beginning of each new row when typing in the Editor. As a result, the method "getRange" returns a wrong "startOffset" index.
### Reproduction of the problem
1. Subscribe to the "select" event of the Editor;
2. Log the property "startOffset" of the "getRange" method in the browser console;
3. Click on any line in the empty Editor and check the logged index. It is "1" instead of "0".
4. Type in any text in the Editor and click at the beginning of the text - the logged index is "1" instead of "0".
A Dojo sample for reproduction: https://dojo.telerik.com/UqUNoBaM/8
### Expected/desired behavior
The non-breaking space should be removed when typing.
### Environment
* **Kendo UI version:** 2021.2.616
* **jQuery version:** 1.12.4
* **Browser:** [all]
The last row of a table in the Editor cannot be resized.
The upper row will be resized instead.
The last row should be resized.
Hello,
I have an issue when I use the drag and drop of a picture in the kendo Editor inline.
Let me explain it :
1) Go to : https://runner.telerik.io/fullscreen/uWosAbib (It's the standard example on your site) on chrome 123
2) Select the last editor "Rich UI Widgets for..."
3) Take a file of a picture on your computer and drop it on the first editor "Comprehensive HTML5/..."
Two things :
* The file open on a new tab browser instead of to be added to the html of the first editor
* There is a message in the debug tools (The stack trace is added in the Attach Files)
Uncaught TypeError: Cannot read properties of null (reading 'nodeType')
at init.index (kendo.all.js:135127:1)
Another element, if you don't select and just drag and drop it's work.
Thank you for your awesome framework and good luck with the correction !
I've configured a Kendo-UI editor so that it supports two tools ("foreColor" and "formatting") (see this DOJO). When the input area is focused, the toolbar can be reached by pressing SHIFT+TAB.
Expected behavior according to the docs: The last-used toolbar item is focused (default: the first item). By pressing SPACE or ENTER, the tool can be activated and used.
Actual behavior (only if the "formatting" tool is present): The "formatting" tool is focused and already activated. Arrow buttons swicth between the different formatting styles instead of selecting the next/previous toolbar item.
Note: When using F10 to focus the toolbar, everything works as expected as long as you don't use TAB afterwards to move the focus back to the input area. The issue seems to be that some container of the formatting tool has its "tabindex" is initially set to "0".
The ColorPickers in the Editor allow the user to change the text color or the background color of a selection in the component. When the Editor is working in Inline mode, if you select a text and manually enter a value in the HEX input of a ColorPicker, the pre-selected text is no longer selected. No text is colored inside the Editor.
The ColorPicker closes. The selected text in the Editor before opening the ColorPicker is no longer selected. No text in the Editor is in the color entered in the HEX editor.
Clicking on the Apply button of the ColorPicker, after a HEX value is entered, should close the ColorPicker and color the pre-selected text. This correct behavior can be observed in the second Editor in the linked above Dojo example.
Hi,
please review the following steps:
1) Go to: https://dojo.telerik.com/@lhoeppner/IYoKegOY
2) In the editor, click the "View Html" button
3) Select all, then paste this new content, then select "Update":
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title>
<style type="text/css">.csAD7A2888{text-align:left;text-indent:0pt;margin:12pt 0pt 12pt 0pt}
.cs2D694F89{color:#000000;background-color:transparent;font-family:Tahoma;font-size:10pt;font-weight:normal;font-style:normal;}
.csC8F6D76{color:#000000;background-color:transparent;font-family:Calibri;font-size:11pt;font-weight:normal;font-style:normal;}
</style>
<p class="csAD7A2888"><span class="cs2D694F89">1st line</span></p>
<p class="csAD7A2888"><span class="cs2D694F89">2nd line</span></p>
<p class="csAD7A2888"><span class="cs2D694F89">3rd line </span></p>
<p class="csAD7A2888"><span class="cs2D694F89">4th line</span></p>
<p class="csAD7A2888"><span class="cs2D694F89">...</span></p>
<p class="csAD7A2888"><span class="csC8F6D76">Tim Allens 24-08-2022 18:02 (UTC+00:00) Dublin, Edinburgh, Lisbon, L</span></p>
4) Click to put the cursor in front of "2nd line", then click to put the cursor in front of "1st line" (at the beginning of the note)
5) Press backspace
Result: The line starting with "1st line..." is deleted.
6) Put cursor in front of "3rd line", then back in front of "2nd line", press backspace
Result: The line starting with "2nd line..." is deleted.
Backspace shouldn't delete anything in that scenario because the cursor is in front of all note content, and nothing is selected.
The deletion occurs via kendo.editor._handleBackspace/_merge
Thanks,
Lars
When an image is placed inside an <a>
tag resizing the image does not work as expected
The image can not be resized back to the original size (screencast). Its width can not be changed.
In case the image is set to float on the right after resizing its width becomes about 10px and is almost hidden - Dojo
It should be possible to resize the image by increasing/decreasing the size and keeping the width/height ratio.
Inline Editor does not close if you drag it to another position. Additionally, while dragging, occasionally the Editor will disappear, or it will have a padding from the cursor.
Regression introduced with 2023.2.606
Video - http://somup.com/cZeOQ5CYa8
The inline Editor remains open when it loses focus
Thе inline Editor should close when it loses focus
If the ColorPicker tools in the Editor are configured to render a gradient, you cannot type in the HEX/RGB inputs.
The inputs are not selectable and you cannot type in them.
The inputs should be selectable so that you can type in them.
Using Edge/Chrome, upon pasting underline text in the Kendo UI Editor, the content is rendered underline, but the UI doesn't highlight the button. In turn, if the user toggles the underline style for parts of the text, it doesn't work. At this point, the button is now highlighted for the part, but switching back to no underline style doesn't have any effect regarding the rendering. Removing the style for the whole line does work as expected.
The underlined text decoration should be recognized by the UI and display.
As a comparison, here is the content after paste:
<p><span style="text-decoration-line:underline;">some text with underline</span></p>
<p><span style="text-decoration:underline;">some text with underline</span></p>
Bug report
Editor inserts two <br /> with enter press when insertLineBreak is changed to br
Reproduction of the problem
Open Dojo: https://dojo.telerik.com/EtUZIVUX
Place the cursor at the end of a line and press ENTER
Expected/desired behavior
Only one <br /> shall be added
Environment
Kendo UI version: [all]
Browser: [all]
When the content is scrolled and the user tries to click in the Editor, the cursor is not always set on the correct position
Sometimes the cursor is not set in the expected position. screencast - https://somup.com/c0VvQMxw1m
The cursor should be set on the correct place when clicking
Content pasted from Outlook/Word might lead to throwing a 'Cannot read properties of null (reading 'nodeType')' error when pasted in Editor.
An error: Cannot read properties of null (reading 'nodeType') is thrown in the console
No error should be thrown when pasting content into the Editor
Note: The purpose of the issue is to avoid errors in the console not styling the content as list.
`paste: function(e){
e.html = e.html.replace(/MsoNormal/g, "");
e.html = e.html.replace(/mso/g, "");
}
If you remove an image in the Editor and then return it with undo action, the image resize handlers will be duplicated.
The resize handlers are duplicated.
The resize handlers shouldn't be duplicated.
When an image from docx file is pasted in the Editor an error is thrown.
An error is thrown : "Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'"
screencast
There should be no errors in the console.
Hi,
Bullets are not removed when content is deleted.
Observe that two bullet points remain
When uploading a file through the Editor's FileBrowser, the file's name is not updated with the name coming generated on the server. The file's name is updated in the ImageBrowser using the same server code.
Editor configuration:
$("#editor").kendoEditor({
fileBrowser: {
schema: {
model: {
id: "name",
fields: {
name: { field: "name" },
type: { field: "type" },
size: { field: "size" }
}
}
},
transport: {
read: "@Url.HttpRouteUrl("ActionApi", new {controller = "MessageTemplates", action = "Read"})",
destroy: "",
create: "",
uploadUrl: "@Url.HttpRouteUrl("ActionApi", new {action = "UploadMp3", controller = "MessageTemplates" })",
fileUrl: function (name) {
var url = "/files/" + name + "/";
return url;
}
},
fileTypes: "*.mp3, *.pdf"
},
tools: ['insertImage', 'insertFile']
});
Controller:
[HttpPost]
[ActionName("Read")]
public object Read()
{
try
{
string path = HttpContext.Current.Request.Params["path"];
var fullPath = System.Web.Hosting.HostingEnvironment.MapPath(@"~/Files/" + path);
DirectoryInfo dir = new DirectoryInfo(fullPath);
var result = dir.GetFiles("*.*").Select(f => new
{
name = f.Name,
type = "f",
size = (long)0,
}).ToList();
return result;
}
catch (Exception e)
{
return null;
//throw new HttpException(404, "File Not Found");
}
}
[HttpPost]
[ActionName("UploadMp3")]
public HttpResponseMessage UploadMp3()
{
var file = HttpContext.Current.Request.Files[0];
try
{
return Request.CreateResponse(HttpStatusCode.Created, new
{
size = file.ContentLength,
name = Guid.NewGuid().ToString(),
type = "f"
});
}
catch (Exception e)
{
return new HttpResponseMessage(HttpStatusCode.BadRequest);
}
}
The file name is not updated whereas it is being updated in the ImageBrowser.
The file name should be updated as in the ImageBrowser.
Reproducible with inline and classic Editor.
Dojo example.
Undo does not work the first time Ctrl + Z keys are pressed. It works, if you press them a second time.
If the keydown event handler is not attached, it works as expected.
Undo works on the first press of Ctrl + Z keys.
Dojo example.
For more details see Ticket ID: 1478828
A js exception is thrown:
kendo.all.js:78925 Uncaught DOMException: Failed to execute 'setStart' on 'Range': There is no child at offset 3.
No exceptions.
Dojo example.
The border color of all cells is changed. If you re-open the table wizard and follow the same steps only the selected cell border color is set (expected). This behavior is not reproducible with tables added through the createTable tool.
The border color of the selected cell is changed.