Skip to content

Commit db26085

Browse files
committed
Sync with Kendo UI Professional
1 parent 41a8c80 commit db26085

File tree

15 files changed

+1687
-997
lines changed

15 files changed

+1687
-997
lines changed

docs-aspnet/_config-mvc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ getting-started-mvc/*]
140140
## The application virtual path
141141
baseurl: /aspnet-mvc
142142

143-
ff-sheet-id: 17DDhsKyPUgO6GlvL8WEfCCN6tikyInp4qpRGCvvs794
143+
productCode: KENDOUIMVC
144144

145145
## Product
146146
product_long: "Progress Telerik UI for ASP.NET MVC"
@@ -599,7 +599,7 @@ defaults:
599599
path: "html-helpers/navigation/splitbutton"
600600
values:
601601
title_prefix: "ASP.NET MVC SplitButton Component"
602-
-
602+
-
603603
scope:
604604
path: "html-helpers/navigation/stepper"
605605
values:
@@ -689,7 +689,7 @@ defaults:
689689
path: "html-helpers/scheduling/scheduler"
690690
values:
691691
title_prefix: "ASP.NET MVC Scheduler Component"
692-
-
692+
-
693693
scope:
694694
path: "html-helpers/template"
695695
values:

docs-aspnet/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ themesCdnVersion: "9.0.0"
722722
## The MVC Core version used
723723
mvcCoreVersion: "2024.3.1015"
724724

725-
ff-sheet-id: 1mottKpkbJFxkUq6rS3CsPrT8JQOE2JlUtsJBR622cxs
725+
productCode: UIASPCORE
726726

727727
## Product
728728
product_long: "Progress Telerik UI for ASP.NET Core"

docs-aspnet/html-helpers/media/mediaplayer/accessibility/keyboard-navigation.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,45 @@ position: 2
99

1010
# Keyboard Navigation
1111

12-
The keyboard navigation of the MediaPlayer is always available.
12+
The keyboard navigation of the MediaPlayer is disabled by default.
1313

14-
To enable it, use the `Navigatable(true)` configuration. For a complete example, refer to the [demo on using the keyboard navigation of the MediaPlayer](https://demos.telerik.com/{{ site.platform }}/mediaplayer/keyboard-navigation).
15-
16-
The MediaPlayer supports the following keyboard shortcuts:
17-
18-
|Shortcut |Description
19-
|:--- |:---
20-
|`Enter` |Opens the video in the full-screen mode.
21-
|`Esc` |Exits the full-screen mode.
22-
|`Space` |Toggles the play and pause state.
23-
|`M` |Toggles the mute and unmute state.
14+
To enable it, use the [`Navigatable(true)`](/api/kendo.mvc.ui.fluent/mediaplayerbuilder#navigatablesystemboolean) configuration.
2415

2516
```HtmlHelper
2617
@(Html.Kendo().MediaPlayer()
27-
.Name("mediaplayer")
18+
.Name("mediaPlayer")
2819
.Navigatable(true)
29-
.Media(m => m
30-
.Title("Our Company Culture - Lesson 1")
31-
.Source("Video/video1.mp4")
32-
)
33-
.HtmlAttributes(new { style = "height:360px; width:640px" })
20+
/* Other configuration. */
3421
)
3522
```
3623
{% if site.core %}
3724
```TagHelper
38-
<kendo-mediaplayer
39-
name="mediaplayer"
40-
navigatable="true"
41-
style = "height:360px; width:640px">
42-
<media title="Our Company Culture - Lesson 1" source="Video/video1.mp4" />
25+
@addTagHelper *, Kendo.Mvc
26+
27+
<kendo-mediaplayer name="mediaPlayer" navigatable="true">
28+
<!-- Other configuration. -->
4329
</kendo-mediaplayer>
44-
```
30+
```
4531
{% endif %}
4632

33+
For a complete example, refer to the [demo on using the keyboard navigation of the MediaPlayer](https://demos.telerik.com/{{ site.platform }}/mediaplayer/keyboard-navigation).
34+
35+
The MediaPlayer supports the following keyboard shortcuts:
36+
37+
|Shortcut |Description
38+
|:--- |:---
39+
|`Enter` |Opens the video in the full-screen mode.
40+
|`Esc` |Exits the full-screen mode.
41+
|`Space` |Toggles the play and pause state.
42+
|`M` |Toggles the mute and unmute state.
43+
|`Right Arrow` |Seeks forward.
44+
|`Left Arrow` |Seels backward.
45+
|`Up Arrow` | Increases the volume.
46+
|`Down Arrow` | Decreases the volume.
47+
|`Ctrl` + `1` | Decreases the video quality.
48+
|`Ctrl` + `2` | Increases the video quality.
49+
50+
4751
## See Also
4852

4953
* [Keyboard Navigation by the MediaPlayer HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/mediaplayer/keyboard-navigation)

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ intro_columns:
22692269
"TileLayout": "overview_kendoui_tilelayout_widget"
22702270
"Window": "overview_kendoui_window_widget"
22712271

2272-
ff-sheet-id: 14zzclhdh7dMLpg0iq4-2hweCdEiuxxqP3tHdr42-_Cs
2272+
productCode: KENDOUICOMPLETE
22732273

22742274
# The google services configuration
22752275
google_tag_manager: GTM-6X92

docs/api/javascript/ui/drawer.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ If set to `true` the use could navigate the widget using the keyboard navigation
111111
});
112112
</script>
113113

114-
### template `String`
114+
### template `String | Function`
115115

116116
Specifies the drawer's content.
117117

@@ -196,7 +196,7 @@ Defines a specific width for the Kendo UI Drawer when in mini mode.
196196
});
197197
</script>
198198

199-
### mini.template `String`
199+
### mini.template `String | Function`
200200

201201
Defines a specific template for the Kendo UI Drawer when in mini mode.
202202

@@ -213,10 +213,25 @@ Defines a specific template for the Kendo UI Drawer when in mini mode.
213213
position: 'left',
214214
mini: {
215215
width: 45,
216-
template: `<ul><li data-role='drawer-item'><span class='k-icon k-i-anchor'></span></li><li data-role='drawer-item'><span class='k-icon k-i-paint'></span></li></ul>`
216+
template: handler
217217
}
218218
}).data("kendoDrawer");
219219
});
220+
221+
function handler() {
222+
return `<ul>
223+
<li data-role='drawer-item'>
224+
${generateIcon('anchor')}
225+
</li>
226+
<li data-role='drawer-item'>
227+
${generateIcon('info-circle')}
228+
</li>
229+
</ul>`
230+
}
231+
232+
function generateIcon(iconName){
233+
return kendo.ui.icon(iconName);
234+
}
220235
</script>
221236

222237
### swipeToOpen `Boolean` *(default: true)*

docs/api/javascript/ui/toolbar.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,8 @@ If set, the ToolBar will render an image with the specified URL in the button.
623623
var baseUrl = "https://demos.telerik.com/kendo-ui/content/shared/icons";
624624
$("#toolbar").kendoToolBar({
625625
items: [
626-
{ type: "button", text: "foo", imageUrl: "/sports/snowboarding.png" },
627-
{ type: "button", text: "bar", imageUrl: "/sports/snowboarding.png" }
626+
{ type: "button", text: "foo", imageUrl: baseUrl + "/sports/snowboarding.png" },
627+
{ type: "button", text: "bar", imageUrl: baseUrl + "/sports/snowboarding.png" }
628628
]
629629
});
630630
</script>
@@ -813,8 +813,8 @@ If set, the ToolBar will render an image with the specified URL in the menu butt
813813
type: "splitButton",
814814
text: "splitButton",
815815
menuButtons: [
816-
{ id: "foo", text: "Foo", imageUrl: "/sports/snowboarding.png" },
817-
{ id: "bar", text: "Bar", imageUrl: "/sports/snowboarding.png" }
816+
{ id: "foo", text: "Foo", imageUrl:baseUrl + "/sports/snowboarding.png" },
817+
{ id: "bar", text: "Bar", imageUrl:baseUrl + "/sports/snowboarding.png" }
818818
]
819819
}
820820
]

docs/api/javascript/ui/treelist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ If set to `true`, the TreeList will select all child rows upon parent row select
17231723
<script>
17241724
$("#treelist").kendoTreeList({
17251725
columns: [
1726-
{ selectable: true, includeChildren: true }
1726+
{ selectable: true, includeChildren: true },
17271727
{ field: "id", width: 250},
17281728
{ field: "name", width: 250 },
17291729
{ field: "age", width: 250}

docs/api/javascript/ui/treeview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,11 +1477,11 @@ Optional. When passed, sets the node text to the specified string
14771477

14781478
var treeview = $("#treeview").data("kendoTreeView");
14791479

1480-
var firstItem = treeview.element.find(".k-item:first");
1480+
var firstItem = treeview.element.find(".k-treeview-item:first");
14811481
/* The result can be observed in the DevTools(F12) console of the browser. */
14821482
console.log(treeview.text(firstItem)); // logs "foo"
14831483

1484-
treeview.text(".k-item:last", "qux"); // sets text to "qux"
1484+
treeview.text(".k-treeview-item:last", "qux"); // sets text to "qux"
14851485
</script>
14861486

14871487
### toggle

docs/api/javascript/ui/ui.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,28 @@ Exposes a jQuery plug-in that will handle the widget creation and attach its cli
1515

1616
#### Example
1717

18-
function TextBox(element, options) {
19-
}
18+
<input />
19+
<script>
20+
var CustomTextBox = kendo.ui.Widget.extend({
21+
options: {
22+
name: "CustomTextBox"
23+
},
24+
value: function (value) {
25+
if (value !== undefined) {
26+
this.element.val(value);
27+
} else {
28+
return this.element.val();
29+
}
30+
}
31+
});
2032

21-
kendo.ui.plugin(TextBox);
33+
kendo.ui.plugin(CustomTextBox);
2234

23-
// initialize a new TextBox for each input, with the given options object.
24-
$("input").kendoTextBox({ });
25-
// get the TextBox object and call the value API method
26-
$("input").data("kendoTextBox").value();
35+
// initialize a new CustomTextBox for each input, with the given options object.
36+
$("input").kendoCustomTextBox({ });
37+
// get the CustomTextBox object and call the value API method
38+
$("input").data("kendoCustomTextBox").value("some value");
39+
</script>
2740

2841
#### Parameters
2942

@@ -292,7 +305,7 @@ If a `string` is provided, it will attempt to render a valid SVG icon from the p
292305

293306
<script>
294307
var icon = kendo.ui.icon({
295-
type: (element, options) => `<span class="my-custom-icon"><span class="k-icon k-i-${options.icon}"></span></span>`
308+
type: (element, options) => `<span class="my-custom-icon"><span class="k-icon k-i-${options.icon}"></span></span>`,
296309
icon: 'camera'
297310
});
298311
$('body').append(icon);

docs/api/javascript/ui/upload.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ Sets the text of the validation messages for invalid files when the `batch` prop
575575
$("#photos").kendoUpload({
576576
async: {
577577
saveUrl: "http://my-app.localhost/save",
578-
removeUrl: "http://my-app.localhost/remove"
578+
removeUrl: "http://my-app.localhost/remove",
579579
batch:true
580580
},
581581
localization: {
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: Moving the Caret to the End of the Kendo UI Editor
3+
description: Learn how to set the focus and move the caret to the end of the content within the Kendo UI Editor.
4+
type: how-to
5+
page_title: How to Focus and Position the Caret at the End in Kendo UI Editor
6+
slug: move-caret-end-kendo-ui-editor
7+
tags: kendo ui, editor, caret, focus, text, content
8+
res_type: kb
9+
ticketid: 1669031
10+
---
11+
12+
## Environment
13+
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>Editor for Progress® Kendo UI®</td>
19+
</tr>
20+
<tr>
21+
<td>Version</td>
22+
<td>2024.3.1015</td>
23+
</tr>
24+
</tbody>
25+
</table>
26+
27+
## Description
28+
29+
I want to move the focus and the caret to the end of the content within the [Editor](https://docs.telerik.com/kendo-ui/api/javascript/ui/editor) for Progress® Kendo UI®. How can I achieve this?
30+
31+
This KB article also answers the following questions:
32+
- How to append text and move the caret to its end in the Kendo UI Editor?
33+
- How to programmatically focus the Kendo UI Editor and position the caret at the end?
34+
- How to manipulate the caret position in the Kendo UI Editor?
35+
36+
## Solution
37+
38+
To set the focus and move the caret to the end of the content in the Kendo UI Editor, follow these steps:
39+
40+
1. Use the Editor's API to append text to the current content.
41+
2. Create a range object and use it to select the content of the Editor.
42+
3. Collapse the range to the end to move the caret position after the appended text.
43+
4. Finally, use the [`selectRange`](https://docs.telerik.com/kendo-ui/api/javascript/ui/editor/methods/selectrange) method of the Editor to apply the range and move the caret.
44+
45+
Here is a sample code snippet demonstrating the process:
46+
47+
```dojo
48+
<div id="example">
49+
<p><button id="changeContent">Change Content</button></p>
50+
<textarea id="editor">Some text to focus and edit.</textarea>
51+
</div>
52+
53+
<script>
54+
$(document).ready(function() {
55+
$("#editor").kendoEditor();
56+
57+
$("#changeContent").click(function () {
58+
var editor = $("#editor").data("kendoEditor");
59+
editor.value(editor.value() + " text");
60+
61+
var range = editor.getRange() || editor.createRange();
62+
range.selectNodeContents(editor.body);
63+
range.collapse(false); // Collapse to end
64+
editor.selectRange(range);
65+
});
66+
});
67+
</script>
68+
```
69+
70+
This code sets up a basic Kendo UI Editor and a button. When the button is clicked, it appends the text " text" to the current content of the Editor and moves the caret to the end of this new content.
71+
72+
## See Also
73+
74+
- [Official Kendo UI Editor Documentation](https://docs.telerik.com/kendo-ui/controls/editor/overview)
75+
- [Editor API Reference](https://docs.telerik.com/kendo-ui/api/javascript/ui/editor)

0 commit comments

Comments
 (0)