@progress/kendo-vue-editor 3.7.4-dev.202301151601 → 3.7.4-dev.202301171215
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.txt +11 -11
- package/dist/cdn/js/kendo-vue-editor.js +1 -1
- package/dist/es/dialogs/insertImage.js +949 -115
- package/dist/es/dialogs/insertLink.js +572 -68
- package/dist/es/dialogs/viewHtml.js +40 -19
- package/dist/es/package-metadata.js +1 -1
- package/dist/esm/dialogs/insertImage.js +949 -115
- package/dist/esm/dialogs/insertLink.js +572 -68
- package/dist/esm/dialogs/viewHtml.js +40 -19
- package/dist/esm/package-metadata.js +1 -1
- package/dist/npm/dialogs/insertImage.js +949 -115
- package/dist/npm/dialogs/insertLink.js +572 -68
- package/dist/npm/dialogs/viewHtml.js +39 -18
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +13 -12
|
@@ -5,12 +5,11 @@ var gh = allVue.h;
|
|
|
5
5
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
6
|
import { Window, DialogActionsBar } from '@progress/kendo-vue-dialogs';
|
|
7
7
|
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
8
|
-
import { TextArea } from '@progress/kendo-vue-inputs';
|
|
9
8
|
import { getHtml, setHtml, indentHtml, trimWhitespace } from '@progress/kendo-editor-common';
|
|
10
9
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
11
10
|
import { messages } from '../messages/main.js';
|
|
12
11
|
import { editorPropsKey } from './../utils/props-key.js';
|
|
13
|
-
import { getRef, setRef } from '@progress/kendo-vue-common';
|
|
12
|
+
import { getRef, setRef, guid } from '@progress/kendo-vue-common';
|
|
14
13
|
/**
|
|
15
14
|
* @hidden
|
|
16
15
|
*/
|
|
@@ -25,13 +24,25 @@ var ViewHtmlDialogVue2 = {
|
|
|
25
24
|
settings: Object,
|
|
26
25
|
dir: String
|
|
27
26
|
},
|
|
27
|
+
created: function created() {
|
|
28
|
+
this.textAreaId = guid();
|
|
29
|
+
},
|
|
28
30
|
inject: {
|
|
29
31
|
kendoLocalizationService: {
|
|
30
32
|
default: null
|
|
31
33
|
}
|
|
32
34
|
},
|
|
35
|
+
data: function data() {
|
|
36
|
+
var view = this.$props.view;
|
|
37
|
+
return {
|
|
38
|
+
textAreaValue: indentHtml(getHtml(view.state))
|
|
39
|
+
};
|
|
40
|
+
},
|
|
33
41
|
mounted: function mounted() {
|
|
34
42
|
this.htmlArea = getRef(this, 'htmlArea');
|
|
43
|
+
if (this.htmlArea) {
|
|
44
|
+
this.htmlArea.focus();
|
|
45
|
+
}
|
|
35
46
|
},
|
|
36
47
|
// @ts-ignore
|
|
37
48
|
setup: !isV3 ? undefined : function () {
|
|
@@ -45,7 +56,6 @@ var ViewHtmlDialogVue2 = {
|
|
|
45
56
|
var _this = this;
|
|
46
57
|
var h = gh || createElement;
|
|
47
58
|
var _a = this.$props,
|
|
48
|
-
view = _a.view,
|
|
49
59
|
settings = _a.settings,
|
|
50
60
|
dir = _a.dir;
|
|
51
61
|
var localization = provideLocalizationService(this);
|
|
@@ -53,23 +63,31 @@ var ViewHtmlDialogVue2 = {
|
|
|
53
63
|
viewHtmlDialogTitle = _b.viewHtmlDialogTitle,
|
|
54
64
|
viewHtmlCancel = _b.viewHtmlCancel,
|
|
55
65
|
viewHtmlUpdate = _b.viewHtmlUpdate;
|
|
56
|
-
var content = h(
|
|
57
|
-
"class": "k-editor-textarea"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
value: indentHtml(getHtml(view.state))
|
|
66
|
+
var content = h("span", {
|
|
67
|
+
"class": "k-input k-textarea k-input-md k-input-solid k-rounded-md k-editor-textarea"
|
|
68
|
+
}, [h("textarea", {
|
|
69
|
+
ref: setRef(this, 'htmlArea'),
|
|
70
|
+
onInput: this.textAreaChange,
|
|
71
|
+
on: this.v3 ? undefined : {
|
|
72
|
+
"input": this.textAreaChange
|
|
64
73
|
},
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
value: this.v3 ? this.textAreaValue : null,
|
|
75
|
+
domProps: this.v3 ? undefined : {
|
|
76
|
+
"value": this.textAreaValue
|
|
67
77
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
id: this.textAreaId,
|
|
79
|
+
attrs: this.v3 ? undefined : {
|
|
80
|
+
id: this.textAreaId,
|
|
81
|
+
role: "textbox",
|
|
82
|
+
tabindex: "0",
|
|
83
|
+
"aria-multiline": "true"
|
|
84
|
+
},
|
|
85
|
+
role: "textbox",
|
|
86
|
+
"class": "k-input-inner !k-overflow-auto",
|
|
87
|
+
tabindex: "0",
|
|
88
|
+
"aria-multiline": "true",
|
|
89
|
+
style: "resize: none;"
|
|
90
|
+
})]);
|
|
73
91
|
var actionButtons = [
|
|
74
92
|
// @ts-ignore function children
|
|
75
93
|
h(KButton, {
|
|
@@ -156,11 +174,14 @@ var ViewHtmlDialogVue2 = {
|
|
|
156
174
|
return dialog;
|
|
157
175
|
},
|
|
158
176
|
methods: {
|
|
177
|
+
textAreaChange: function textAreaChange(e) {
|
|
178
|
+
this.textAreaValue = e.value;
|
|
179
|
+
},
|
|
159
180
|
onUpdate: function onUpdate() {
|
|
160
181
|
var _a = this.$props,
|
|
161
182
|
view = _a.view,
|
|
162
183
|
settings = _a.settings;
|
|
163
|
-
var html = trimWhitespace(this.htmlArea ? this.
|
|
184
|
+
var html = trimWhitespace(this.htmlArea ? this.textAreaValue : '');
|
|
164
185
|
var preserveWhitespace = editorPropsKey.getState(view.state).preserveWhitespace;
|
|
165
186
|
setHtml(html, settings.commandName, {
|
|
166
187
|
preserveWhitespace: preserveWhitespace
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-editor',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1673956950,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
11
|
};
|