@progress/kendo-vue-editor 3.0.0-dev.202201141128 → 3.0.0-dev.202201180953
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/dist/cdn/js/kendo-vue-editor.js +1 -1
- package/dist/es/Editor.js +25 -20
- package/dist/es/dialogs/FindReplace.js +11 -0
- package/dist/es/dialogs/insertImage.js +10 -4
- package/dist/es/dialogs/insertLink.js +10 -4
- package/dist/es/dialogs/viewHtml.js +0 -4
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/tools/fontStyle.js +5 -6
- package/dist/es/tools/formatBlock.js +7 -5
- package/dist/npm/Editor.js +25 -20
- package/dist/npm/dialogs/FindReplace.js +11 -0
- package/dist/npm/dialogs/insertImage.js +10 -4
- package/dist/npm/dialogs/insertLink.js +10 -4
- package/dist/npm/dialogs/viewHtml.js +0 -4
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/tools/fontStyle.js +5 -6
- package/dist/npm/tools/formatBlock.js +7 -5
- package/package.json +12 -12
package/dist/es/Editor.js
CHANGED
|
@@ -267,12 +267,13 @@ var EditorVue2 = {
|
|
|
267
267
|
},
|
|
268
268
|
data: function data() {
|
|
269
269
|
return {
|
|
270
|
+
updateGuid: guid(),
|
|
270
271
|
view: undefined,
|
|
271
272
|
linkDialog: false
|
|
272
273
|
};
|
|
273
274
|
},
|
|
274
275
|
created: function created() {
|
|
275
|
-
this.
|
|
276
|
+
this.view = undefined;
|
|
276
277
|
validatePackage(packageMetadata);
|
|
277
278
|
},
|
|
278
279
|
mounted: function mounted() {
|
|
@@ -290,7 +291,7 @@ var EditorVue2 = {
|
|
|
290
291
|
},
|
|
291
292
|
updated: function updated() {
|
|
292
293
|
var value = this.$props.value;
|
|
293
|
-
var view = this.
|
|
294
|
+
var view = this.view;
|
|
294
295
|
|
|
295
296
|
if (value === undefined || !view) {
|
|
296
297
|
return;
|
|
@@ -309,8 +310,8 @@ var EditorVue2 = {
|
|
|
309
310
|
},
|
|
310
311
|
// @ts-ignore
|
|
311
312
|
unmounted: function unmounted() {
|
|
312
|
-
if (this.
|
|
313
|
-
this.
|
|
313
|
+
if (this.view) {
|
|
314
|
+
this.view.destroy();
|
|
314
315
|
}
|
|
315
316
|
|
|
316
317
|
this.view = undefined;
|
|
@@ -321,8 +322,8 @@ var EditorVue2 = {
|
|
|
321
322
|
return this.trOnChange.doc;
|
|
322
323
|
} else if (this.$props.value !== undefined) {
|
|
323
324
|
return this.$props.value;
|
|
324
|
-
} else if (this.
|
|
325
|
-
return this.
|
|
325
|
+
} else if (this.view) {
|
|
326
|
+
return this.view.state.doc;
|
|
326
327
|
}
|
|
327
328
|
|
|
328
329
|
return this.$props.defaultContent || '';
|
|
@@ -340,6 +341,7 @@ var EditorVue2 = {
|
|
|
340
341
|
var _this = this;
|
|
341
342
|
|
|
342
343
|
var h = gh || createElement;
|
|
344
|
+
var toolindex = 100;
|
|
343
345
|
var _a = this.$props,
|
|
344
346
|
_b = _a.tools,
|
|
345
347
|
tools = _b === void 0 ? [] : _b,
|
|
@@ -381,14 +383,17 @@ var EditorVue2 = {
|
|
|
381
383
|
});
|
|
382
384
|
};
|
|
383
385
|
|
|
384
|
-
var renderTool = function renderTool(currentTool,
|
|
386
|
+
var renderTool = function renderTool(currentTool, _index) {
|
|
385
387
|
var ct = allTools[currentTool] || currentTool;
|
|
386
388
|
|
|
387
389
|
if (allTools[currentTool]) {
|
|
390
|
+
toolindex++;
|
|
391
|
+
|
|
388
392
|
var toolProps = __assign({
|
|
389
393
|
view: view,
|
|
390
394
|
dir: this.$props.dir,
|
|
391
|
-
key:
|
|
395
|
+
key: toolindex,
|
|
396
|
+
updateGuid: this.updateGuid,
|
|
392
397
|
settings: allTools[currentTool].props
|
|
393
398
|
}, allTools[currentTool].props);
|
|
394
399
|
|
|
@@ -398,7 +403,7 @@ var EditorVue2 = {
|
|
|
398
403
|
} else if (ct === 'Separator') {
|
|
399
404
|
return (// @ts-ignore
|
|
400
405
|
h(ToolbarSeparator, {
|
|
401
|
-
key:
|
|
406
|
+
key: toolindex
|
|
402
407
|
})
|
|
403
408
|
);
|
|
404
409
|
} else {
|
|
@@ -411,7 +416,8 @@ var EditorVue2 = {
|
|
|
411
416
|
additionalProps: {
|
|
412
417
|
view: view,
|
|
413
418
|
dir: this.$props.dir,
|
|
414
|
-
|
|
419
|
+
updateGuid: this.updateGuid,
|
|
420
|
+
key: toolindex,
|
|
415
421
|
settings: ct.props
|
|
416
422
|
}
|
|
417
423
|
});
|
|
@@ -477,7 +483,7 @@ var EditorVue2 = {
|
|
|
477
483
|
},
|
|
478
484
|
methods: {
|
|
479
485
|
getView: function getView() {
|
|
480
|
-
return this.
|
|
486
|
+
return this.view;
|
|
481
487
|
},
|
|
482
488
|
getHTML: function getHTML() {
|
|
483
489
|
var view = this.getView();
|
|
@@ -496,16 +502,15 @@ var EditorVue2 = {
|
|
|
496
502
|
}
|
|
497
503
|
},
|
|
498
504
|
focus: function focus() {
|
|
499
|
-
if (this.
|
|
500
|
-
this.
|
|
505
|
+
if (this.view) {
|
|
506
|
+
this.view.focus();
|
|
501
507
|
}
|
|
502
508
|
},
|
|
503
509
|
updateTools: function updateTools(view) {
|
|
504
510
|
this.view = view;
|
|
505
511
|
|
|
506
512
|
if (this.v3) {
|
|
507
|
-
this.
|
|
508
|
-
this.$forceUpdate();
|
|
513
|
+
this.updateGuid = guid();
|
|
509
514
|
}
|
|
510
515
|
},
|
|
511
516
|
iframeLoad: function iframeLoad() {
|
|
@@ -584,7 +589,7 @@ var EditorVue2 = {
|
|
|
584
589
|
})), {
|
|
585
590
|
'Mod-k': function ModK() {
|
|
586
591
|
var linkDialog = _this.$data.linkDialog;
|
|
587
|
-
var editorView = _this.
|
|
592
|
+
var editorView = _this.view;
|
|
588
593
|
|
|
589
594
|
if (editorView) {
|
|
590
595
|
var editorState = editorView.state;
|
|
@@ -632,10 +637,10 @@ var EditorVue2 = {
|
|
|
632
637
|
dom: dom
|
|
633
638
|
};
|
|
634
639
|
this.$emit('loaded', mountEvent);
|
|
635
|
-
var view = this
|
|
640
|
+
var view = this.$props.extendView && this.$props.extendView(mountEvent) || new EditorView({
|
|
636
641
|
mount: dom
|
|
637
642
|
}, viewProps);
|
|
638
|
-
this.view = view;
|
|
643
|
+
this.view = this.v3 ? markRaw(view) : view;
|
|
639
644
|
},
|
|
640
645
|
filterTransaction: function filterTransaction(transaction, state) {
|
|
641
646
|
var event = {
|
|
@@ -689,8 +694,8 @@ var EditorVue2 = {
|
|
|
689
694
|
this.$emit('change', event_2);
|
|
690
695
|
}
|
|
691
696
|
|
|
692
|
-
if (this.
|
|
693
|
-
this.
|
|
697
|
+
if (this.view && (this.$props.value === undefined || !docChanged)) {
|
|
698
|
+
this.view.updateState(this.view.state.apply(transaction));
|
|
694
699
|
}
|
|
695
700
|
},
|
|
696
701
|
onFocus: function onFocus(_view, nativeEvent) {
|
|
@@ -16,6 +16,10 @@ var settings = EditorToolsSettings.findAndReplace; // tslint:enable:max-line-len
|
|
|
16
16
|
|
|
17
17
|
var FindAndReplaceDialogVue2 = {
|
|
18
18
|
name: 'KendoFindAndReplaceDialog',
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
emits: {
|
|
21
|
+
close: null
|
|
22
|
+
},
|
|
19
23
|
props: {
|
|
20
24
|
view: Object,
|
|
21
25
|
settings: {
|
|
@@ -55,6 +59,13 @@ var FindAndReplaceDialogVue2 = {
|
|
|
55
59
|
|
|
56
60
|
this.setNextState();
|
|
57
61
|
this.hasMounted = true;
|
|
62
|
+
setTimeout(function () {
|
|
63
|
+
var findInput = document.getElementById('findWhatFind');
|
|
64
|
+
|
|
65
|
+
if (findInput) {
|
|
66
|
+
findInput.focus();
|
|
67
|
+
}
|
|
68
|
+
}, 10);
|
|
58
69
|
},
|
|
59
70
|
|
|
60
71
|
/**
|
|
@@ -10,6 +10,10 @@ import { messages } from './../messages'; // tslint:enable:max-line-length
|
|
|
10
10
|
|
|
11
11
|
var InsertImageDialogVue2 = {
|
|
12
12
|
name: 'KendoInsertImageDialog',
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
emits: {
|
|
15
|
+
close: null
|
|
16
|
+
},
|
|
13
17
|
props: {
|
|
14
18
|
view: Object,
|
|
15
19
|
settings: Object,
|
|
@@ -26,6 +30,10 @@ var InsertImageDialogVue2 = {
|
|
|
26
30
|
this.title = this.v3 ? this.titleRef : this.$refs.title;
|
|
27
31
|
this.width = this.v3 ? this.widthRef : this.$refs.width;
|
|
28
32
|
this.height = this.v3 ? this.heightRef : this.$refs.height;
|
|
33
|
+
|
|
34
|
+
if (this.src) {
|
|
35
|
+
this.src.focus();
|
|
36
|
+
}
|
|
29
37
|
},
|
|
30
38
|
// @ts-ignore
|
|
31
39
|
setup: !gh ? undefined : function () {
|
|
@@ -79,8 +87,7 @@ var InsertImageDialogVue2 = {
|
|
|
79
87
|
type: "text",
|
|
80
88
|
attrs: this.v3 ? undefined : {
|
|
81
89
|
type: "text",
|
|
82
|
-
id: "k-editor-image-url"
|
|
83
|
-
autoFocus: true
|
|
90
|
+
id: "k-editor-image-url"
|
|
84
91
|
},
|
|
85
92
|
"class": "k-input-inner",
|
|
86
93
|
id: "k-editor-image-url",
|
|
@@ -90,8 +97,7 @@ var InsertImageDialogVue2 = {
|
|
|
90
97
|
},
|
|
91
98
|
ref: this.v3 ? function (el) {
|
|
92
99
|
_this.srcRef = el;
|
|
93
|
-
} : 'src'
|
|
94
|
-
autoFocus: true
|
|
100
|
+
} : 'src'
|
|
95
101
|
})])]), h("div", {
|
|
96
102
|
"class": "k-edit-label"
|
|
97
103
|
}, [h("label", {
|
|
@@ -10,6 +10,10 @@ import { messages } from './../messages'; // tslint:enable:max-line-length
|
|
|
10
10
|
|
|
11
11
|
var InsertLinkDialogVue2 = {
|
|
12
12
|
name: 'KendoInsertLinkDialog',
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
emits: {
|
|
15
|
+
close: null
|
|
16
|
+
},
|
|
13
17
|
props: {
|
|
14
18
|
view: Object,
|
|
15
19
|
settings: Object,
|
|
@@ -31,6 +35,10 @@ var InsertLinkDialogVue2 = {
|
|
|
31
35
|
this.href = this.v3 ? this.hrefRef : this.$refs.href;
|
|
32
36
|
this.title = this.v3 ? this.titleRef : this.$refs.title;
|
|
33
37
|
this.target = this.v3 ? this.targetRef : this.$refs.target;
|
|
38
|
+
|
|
39
|
+
if (this.href) {
|
|
40
|
+
this.href.focus();
|
|
41
|
+
}
|
|
34
42
|
},
|
|
35
43
|
// @ts-ignore
|
|
36
44
|
render: function render(createElement) {
|
|
@@ -69,8 +77,7 @@ var InsertLinkDialogVue2 = {
|
|
|
69
77
|
type: "text",
|
|
70
78
|
attrs: this.v3 ? undefined : {
|
|
71
79
|
type: "text",
|
|
72
|
-
id: "k-editor-link-url"
|
|
73
|
-
autoFocus: true
|
|
80
|
+
id: "k-editor-link-url"
|
|
74
81
|
},
|
|
75
82
|
"class": "k-input-inner",
|
|
76
83
|
ref: this.v3 ? function (el) {
|
|
@@ -80,8 +87,7 @@ var InsertLinkDialogVue2 = {
|
|
|
80
87
|
value: this.v3 ? linkMark && linkMark.attrs.href || undefined : null,
|
|
81
88
|
domProps: this.v3 ? undefined : {
|
|
82
89
|
"value": linkMark && linkMark.attrs.href || undefined
|
|
83
|
-
}
|
|
84
|
-
autoFocus: true
|
|
90
|
+
}
|
|
85
91
|
})])]), h("div", {
|
|
86
92
|
"class": "k-edit-label k-editor-link-text-row"
|
|
87
93
|
}, [h("label", {
|
|
@@ -59,10 +59,6 @@ var ViewHtmlDialogVue2 = {
|
|
|
59
59
|
value: this.v3 ? indentHtml(getHtml(view.state)) : null,
|
|
60
60
|
domProps: this.v3 ? undefined : {
|
|
61
61
|
"value": indentHtml(getHtml(view.state))
|
|
62
|
-
},
|
|
63
|
-
autoFocus: true,
|
|
64
|
-
attrs: this.v3 ? undefined : {
|
|
65
|
-
autoFocus: true
|
|
66
62
|
}
|
|
67
63
|
});
|
|
68
64
|
var actionButtons = [// @ts-ignore function children
|
|
@@ -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: 1642498893,
|
|
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
|
};
|
|
@@ -89,12 +89,13 @@ var FontNameVue2 = {
|
|
|
89
89
|
other = __rest(_a, ["view", "render", "dataItems", "settings", "defaultItem"]);
|
|
90
90
|
|
|
91
91
|
var style = settings.style;
|
|
92
|
-
var items = dataItems || settings.items;
|
|
93
|
-
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
94
92
|
var styles = view ? getInlineStyles(view.state, {
|
|
95
93
|
name: style,
|
|
96
94
|
value: /^.+$/
|
|
97
95
|
}) : [];
|
|
96
|
+
var value = new Set(styles).size === 1 ? styles[0] : null;
|
|
97
|
+
var items = dataItems || settings.items;
|
|
98
|
+
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
98
99
|
var localization = provideLocalizationService(this);
|
|
99
100
|
|
|
100
101
|
if (defaultItem && defaultItem.localizationKey) {
|
|
@@ -102,8 +103,6 @@ var FontNameVue2 = {
|
|
|
102
103
|
defaultItem.text = defaultItem.localizationKey ? localization.toLanguageString(defaultItem.localizationKey, messages[defaultItem.localizationKey]) : defaultItem.text;
|
|
103
104
|
}
|
|
104
105
|
|
|
105
|
-
var value = new Set(styles).size === 1 ? styles[0] : null;
|
|
106
|
-
|
|
107
106
|
var ddlProps = __assign(__assign(__assign({}, other), {
|
|
108
107
|
value: value ? items.find(function (i) {
|
|
109
108
|
return i.value === value;
|
|
@@ -139,13 +138,13 @@ var FontNameVue2 = {
|
|
|
139
138
|
}, __spreadArrays(li.children))]) : li;
|
|
140
139
|
},
|
|
141
140
|
onChange: function onChange(e) {
|
|
142
|
-
var item = e.target.value;
|
|
143
141
|
var _a = this.$props,
|
|
144
142
|
view = _a.view,
|
|
145
143
|
settings = _a.settings;
|
|
146
144
|
var style = settings.style;
|
|
145
|
+
var item = e.target.value;
|
|
147
146
|
|
|
148
|
-
if (view
|
|
147
|
+
if (view) {
|
|
149
148
|
applyInlineStyle({
|
|
150
149
|
style: style,
|
|
151
150
|
value: item.value
|
|
@@ -89,9 +89,10 @@ var FormatBlockVue2 = {
|
|
|
89
89
|
other = __rest(_a, ["view", "render", "dataItems", "settings", "defaultItem"]);
|
|
90
90
|
|
|
91
91
|
var items = dataItems || settings.items;
|
|
92
|
-
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
93
92
|
var state = view && view.state;
|
|
94
93
|
var formats = state ? getBlockFormats(state) : [];
|
|
94
|
+
var value = new Set(formats).size === 1 ? formats[0] : null;
|
|
95
|
+
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
95
96
|
var localization = provideLocalizationService(this);
|
|
96
97
|
|
|
97
98
|
if (defaultItem && defaultItem.localizationKey) {
|
|
@@ -99,8 +100,6 @@ var FormatBlockVue2 = {
|
|
|
99
100
|
defaultItem.text = defaultItem.localizationKey ? localization.toLanguageString(defaultItem.localizationKey, messages[defaultItem.localizationKey]) : defaultItem.text;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
var value = new Set(formats).size === 1 ? formats[0] : null;
|
|
103
|
-
|
|
104
103
|
var ddlProps = __assign(__assign(__assign({}, other), {
|
|
105
104
|
value: value ? items.find(function (i) {
|
|
106
105
|
return i.value === value;
|
|
@@ -110,7 +109,10 @@ var FormatBlockVue2 = {
|
|
|
110
109
|
itemRender: this.customItemRender,
|
|
111
110
|
textField: 'text',
|
|
112
111
|
dataItemKey: 'value',
|
|
113
|
-
leftRightKeysNavigation: false
|
|
112
|
+
leftRightKeysNavigation: false,
|
|
113
|
+
popupSettings: {
|
|
114
|
+
width: '170px'
|
|
115
|
+
}
|
|
114
116
|
}), settings.props);
|
|
115
117
|
|
|
116
118
|
var dropdown = h(DropDownList, __assign({
|
|
@@ -136,10 +138,10 @@ var FormatBlockVue2 = {
|
|
|
136
138
|
}, __spreadArrays(li.children))]) : li;
|
|
137
139
|
},
|
|
138
140
|
onChange: function onChange(e) {
|
|
139
|
-
var item = e.target.value;
|
|
140
141
|
var _a = this.$props,
|
|
141
142
|
view = _a.view,
|
|
142
143
|
settings = _a.settings;
|
|
144
|
+
var item = e.target.value;
|
|
143
145
|
|
|
144
146
|
if (view && formatBlockElements(item.value, settings.commandName)(view.state, view.dispatch)) {
|
|
145
147
|
var event_1 = e.event;
|
package/dist/npm/Editor.js
CHANGED
|
@@ -307,12 +307,13 @@ var EditorVue2 = {
|
|
|
307
307
|
},
|
|
308
308
|
data: function data() {
|
|
309
309
|
return {
|
|
310
|
+
updateGuid: kendo_vue_common_1.guid(),
|
|
310
311
|
view: undefined,
|
|
311
312
|
linkDialog: false
|
|
312
313
|
};
|
|
313
314
|
},
|
|
314
315
|
created: function created() {
|
|
315
|
-
this.
|
|
316
|
+
this.view = undefined;
|
|
316
317
|
kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
317
318
|
},
|
|
318
319
|
mounted: function mounted() {
|
|
@@ -330,7 +331,7 @@ var EditorVue2 = {
|
|
|
330
331
|
},
|
|
331
332
|
updated: function updated() {
|
|
332
333
|
var value = this.$props.value;
|
|
333
|
-
var view = this.
|
|
334
|
+
var view = this.view;
|
|
334
335
|
|
|
335
336
|
if (value === undefined || !view) {
|
|
336
337
|
return;
|
|
@@ -349,8 +350,8 @@ var EditorVue2 = {
|
|
|
349
350
|
},
|
|
350
351
|
// @ts-ignore
|
|
351
352
|
unmounted: function unmounted() {
|
|
352
|
-
if (this.
|
|
353
|
-
this.
|
|
353
|
+
if (this.view) {
|
|
354
|
+
this.view.destroy();
|
|
354
355
|
}
|
|
355
356
|
|
|
356
357
|
this.view = undefined;
|
|
@@ -361,8 +362,8 @@ var EditorVue2 = {
|
|
|
361
362
|
return this.trOnChange.doc;
|
|
362
363
|
} else if (this.$props.value !== undefined) {
|
|
363
364
|
return this.$props.value;
|
|
364
|
-
} else if (this.
|
|
365
|
-
return this.
|
|
365
|
+
} else if (this.view) {
|
|
366
|
+
return this.view.state.doc;
|
|
366
367
|
}
|
|
367
368
|
|
|
368
369
|
return this.$props.defaultContent || '';
|
|
@@ -380,6 +381,7 @@ var EditorVue2 = {
|
|
|
380
381
|
var _this = this;
|
|
381
382
|
|
|
382
383
|
var h = gh || createElement;
|
|
384
|
+
var toolindex = 100;
|
|
383
385
|
var _a = this.$props,
|
|
384
386
|
_b = _a.tools,
|
|
385
387
|
tools = _b === void 0 ? [] : _b,
|
|
@@ -421,14 +423,17 @@ var EditorVue2 = {
|
|
|
421
423
|
});
|
|
422
424
|
};
|
|
423
425
|
|
|
424
|
-
var renderTool = function renderTool(currentTool,
|
|
426
|
+
var renderTool = function renderTool(currentTool, _index) {
|
|
425
427
|
var ct = exports.allTools[currentTool] || currentTool;
|
|
426
428
|
|
|
427
429
|
if (exports.allTools[currentTool]) {
|
|
430
|
+
toolindex++;
|
|
431
|
+
|
|
428
432
|
var toolProps = __assign({
|
|
429
433
|
view: view,
|
|
430
434
|
dir: this.$props.dir,
|
|
431
|
-
key:
|
|
435
|
+
key: toolindex,
|
|
436
|
+
updateGuid: this.updateGuid,
|
|
432
437
|
settings: exports.allTools[currentTool].props
|
|
433
438
|
}, exports.allTools[currentTool].props);
|
|
434
439
|
|
|
@@ -438,7 +443,7 @@ var EditorVue2 = {
|
|
|
438
443
|
} else if (ct === 'Separator') {
|
|
439
444
|
return (// @ts-ignore
|
|
440
445
|
h(kendo_vue_buttons_1.ToolbarSeparator, {
|
|
441
|
-
key:
|
|
446
|
+
key: toolindex
|
|
442
447
|
})
|
|
443
448
|
);
|
|
444
449
|
} else {
|
|
@@ -451,7 +456,8 @@ var EditorVue2 = {
|
|
|
451
456
|
additionalProps: {
|
|
452
457
|
view: view,
|
|
453
458
|
dir: this.$props.dir,
|
|
454
|
-
|
|
459
|
+
updateGuid: this.updateGuid,
|
|
460
|
+
key: toolindex,
|
|
455
461
|
settings: ct.props
|
|
456
462
|
}
|
|
457
463
|
});
|
|
@@ -517,7 +523,7 @@ var EditorVue2 = {
|
|
|
517
523
|
},
|
|
518
524
|
methods: {
|
|
519
525
|
getView: function getView() {
|
|
520
|
-
return this.
|
|
526
|
+
return this.view;
|
|
521
527
|
},
|
|
522
528
|
getHTML: function getHTML() {
|
|
523
529
|
var view = this.getView();
|
|
@@ -536,16 +542,15 @@ var EditorVue2 = {
|
|
|
536
542
|
}
|
|
537
543
|
},
|
|
538
544
|
focus: function focus() {
|
|
539
|
-
if (this.
|
|
540
|
-
this.
|
|
545
|
+
if (this.view) {
|
|
546
|
+
this.view.focus();
|
|
541
547
|
}
|
|
542
548
|
},
|
|
543
549
|
updateTools: function updateTools(view) {
|
|
544
550
|
this.view = view;
|
|
545
551
|
|
|
546
552
|
if (this.v3) {
|
|
547
|
-
this.
|
|
548
|
-
this.$forceUpdate();
|
|
553
|
+
this.updateGuid = kendo_vue_common_1.guid();
|
|
549
554
|
}
|
|
550
555
|
},
|
|
551
556
|
iframeLoad: function iframeLoad() {
|
|
@@ -624,7 +629,7 @@ var EditorVue2 = {
|
|
|
624
629
|
})), {
|
|
625
630
|
'Mod-k': function ModK() {
|
|
626
631
|
var linkDialog = _this.$data.linkDialog;
|
|
627
|
-
var editorView = _this.
|
|
632
|
+
var editorView = _this.view;
|
|
628
633
|
|
|
629
634
|
if (editorView) {
|
|
630
635
|
var editorState = editorView.state;
|
|
@@ -672,10 +677,10 @@ var EditorVue2 = {
|
|
|
672
677
|
dom: dom
|
|
673
678
|
};
|
|
674
679
|
this.$emit('loaded', mountEvent);
|
|
675
|
-
var view = this
|
|
680
|
+
var view = this.$props.extendView && this.$props.extendView(mountEvent) || new kendo_editor_common_1.EditorView({
|
|
676
681
|
mount: dom
|
|
677
682
|
}, viewProps);
|
|
678
|
-
this.view = view;
|
|
683
|
+
this.view = this.v3 ? markRaw(view) : view;
|
|
679
684
|
},
|
|
680
685
|
filterTransaction: function filterTransaction(transaction, state) {
|
|
681
686
|
var event = {
|
|
@@ -729,8 +734,8 @@ var EditorVue2 = {
|
|
|
729
734
|
this.$emit('change', event_2);
|
|
730
735
|
}
|
|
731
736
|
|
|
732
|
-
if (this.
|
|
733
|
-
this.
|
|
737
|
+
if (this.view && (this.$props.value === undefined || !docChanged)) {
|
|
738
|
+
this.view.updateState(this.view.state.apply(transaction));
|
|
734
739
|
}
|
|
735
740
|
},
|
|
736
741
|
onFocus: function onFocus(_view, nativeEvent) {
|
|
@@ -32,6 +32,10 @@ var settings = toolsSettings_1.EditorToolsSettings.findAndReplace; // tslint:ena
|
|
|
32
32
|
|
|
33
33
|
var FindAndReplaceDialogVue2 = {
|
|
34
34
|
name: 'KendoFindAndReplaceDialog',
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
emits: {
|
|
37
|
+
close: null
|
|
38
|
+
},
|
|
35
39
|
props: {
|
|
36
40
|
view: Object,
|
|
37
41
|
settings: {
|
|
@@ -71,6 +75,13 @@ var FindAndReplaceDialogVue2 = {
|
|
|
71
75
|
|
|
72
76
|
this.setNextState();
|
|
73
77
|
this.hasMounted = true;
|
|
78
|
+
setTimeout(function () {
|
|
79
|
+
var findInput = document.getElementById('findWhatFind');
|
|
80
|
+
|
|
81
|
+
if (findInput) {
|
|
82
|
+
findInput.focus();
|
|
83
|
+
}
|
|
84
|
+
}, 10);
|
|
74
85
|
},
|
|
75
86
|
|
|
76
87
|
/**
|
|
@@ -23,6 +23,10 @@ var messages_1 = require("./../messages"); // tslint:enable:max-line-length
|
|
|
23
23
|
|
|
24
24
|
var InsertImageDialogVue2 = {
|
|
25
25
|
name: 'KendoInsertImageDialog',
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
emits: {
|
|
28
|
+
close: null
|
|
29
|
+
},
|
|
26
30
|
props: {
|
|
27
31
|
view: Object,
|
|
28
32
|
settings: Object,
|
|
@@ -39,6 +43,10 @@ var InsertImageDialogVue2 = {
|
|
|
39
43
|
this.title = this.v3 ? this.titleRef : this.$refs.title;
|
|
40
44
|
this.width = this.v3 ? this.widthRef : this.$refs.width;
|
|
41
45
|
this.height = this.v3 ? this.heightRef : this.$refs.height;
|
|
46
|
+
|
|
47
|
+
if (this.src) {
|
|
48
|
+
this.src.focus();
|
|
49
|
+
}
|
|
42
50
|
},
|
|
43
51
|
// @ts-ignore
|
|
44
52
|
setup: !gh ? undefined : function () {
|
|
@@ -92,8 +100,7 @@ var InsertImageDialogVue2 = {
|
|
|
92
100
|
type: "text",
|
|
93
101
|
attrs: this.v3 ? undefined : {
|
|
94
102
|
type: "text",
|
|
95
|
-
id: "k-editor-image-url"
|
|
96
|
-
autoFocus: true
|
|
103
|
+
id: "k-editor-image-url"
|
|
97
104
|
},
|
|
98
105
|
"class": "k-input-inner",
|
|
99
106
|
id: "k-editor-image-url",
|
|
@@ -103,8 +110,7 @@ var InsertImageDialogVue2 = {
|
|
|
103
110
|
},
|
|
104
111
|
ref: this.v3 ? function (el) {
|
|
105
112
|
_this.srcRef = el;
|
|
106
|
-
} : 'src'
|
|
107
|
-
autoFocus: true
|
|
113
|
+
} : 'src'
|
|
108
114
|
})])]), h("div", {
|
|
109
115
|
"class": "k-edit-label"
|
|
110
116
|
}, [h("label", {
|
|
@@ -23,6 +23,10 @@ var messages_1 = require("./../messages"); // tslint:enable:max-line-length
|
|
|
23
23
|
|
|
24
24
|
var InsertLinkDialogVue2 = {
|
|
25
25
|
name: 'KendoInsertLinkDialog',
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
emits: {
|
|
28
|
+
close: null
|
|
29
|
+
},
|
|
26
30
|
props: {
|
|
27
31
|
view: Object,
|
|
28
32
|
settings: Object,
|
|
@@ -44,6 +48,10 @@ var InsertLinkDialogVue2 = {
|
|
|
44
48
|
this.href = this.v3 ? this.hrefRef : this.$refs.href;
|
|
45
49
|
this.title = this.v3 ? this.titleRef : this.$refs.title;
|
|
46
50
|
this.target = this.v3 ? this.targetRef : this.$refs.target;
|
|
51
|
+
|
|
52
|
+
if (this.href) {
|
|
53
|
+
this.href.focus();
|
|
54
|
+
}
|
|
47
55
|
},
|
|
48
56
|
// @ts-ignore
|
|
49
57
|
render: function render(createElement) {
|
|
@@ -82,8 +90,7 @@ var InsertLinkDialogVue2 = {
|
|
|
82
90
|
type: "text",
|
|
83
91
|
attrs: this.v3 ? undefined : {
|
|
84
92
|
type: "text",
|
|
85
|
-
id: "k-editor-link-url"
|
|
86
|
-
autoFocus: true
|
|
93
|
+
id: "k-editor-link-url"
|
|
87
94
|
},
|
|
88
95
|
"class": "k-input-inner",
|
|
89
96
|
ref: this.v3 ? function (el) {
|
|
@@ -93,8 +100,7 @@ var InsertLinkDialogVue2 = {
|
|
|
93
100
|
value: this.v3 ? linkMark && linkMark.attrs.href || undefined : null,
|
|
94
101
|
domProps: this.v3 ? undefined : {
|
|
95
102
|
"value": linkMark && linkMark.attrs.href || undefined
|
|
96
|
-
}
|
|
97
|
-
autoFocus: true
|
|
103
|
+
}
|
|
98
104
|
})])]), h("div", {
|
|
99
105
|
"class": "k-edit-label k-editor-link-text-row"
|
|
100
106
|
}, [h("label", {
|
|
@@ -73,10 +73,6 @@ var ViewHtmlDialogVue2 = {
|
|
|
73
73
|
value: this.v3 ? kendo_editor_common_1.indentHtml(kendo_editor_common_1.getHtml(view.state)) : null,
|
|
74
74
|
domProps: this.v3 ? undefined : {
|
|
75
75
|
"value": kendo_editor_common_1.indentHtml(kendo_editor_common_1.getHtml(view.state))
|
|
76
|
-
},
|
|
77
|
-
autoFocus: true,
|
|
78
|
-
attrs: this.v3 ? undefined : {
|
|
79
|
-
autoFocus: true
|
|
80
76
|
}
|
|
81
77
|
});
|
|
82
78
|
var actionButtons = [// @ts-ignore function children
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-vue-editor',
|
|
9
9
|
productName: 'Kendo UI for Vue',
|
|
10
10
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1642498893,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|
|
@@ -102,12 +102,13 @@ var FontNameVue2 = {
|
|
|
102
102
|
other = __rest(_a, ["view", "render", "dataItems", "settings", "defaultItem"]);
|
|
103
103
|
|
|
104
104
|
var style = settings.style;
|
|
105
|
-
var items = dataItems || settings.items;
|
|
106
|
-
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
107
105
|
var styles = view ? kendo_editor_common_1.getInlineStyles(view.state, {
|
|
108
106
|
name: style,
|
|
109
107
|
value: /^.+$/
|
|
110
108
|
}) : [];
|
|
109
|
+
var value = new Set(styles).size === 1 ? styles[0] : null;
|
|
110
|
+
var items = dataItems || settings.items;
|
|
111
|
+
var defaultItem = defaultItemProps || settings.defaultItem;
|
|
111
112
|
var localization = kendo_vue_intl_1.provideLocalizationService(this);
|
|
112
113
|
|
|
113
114
|
if (defaultItem && defaultItem.localizationKey) {
|
|
@@ -115,8 +116,6 @@ var FontNameVue2 = {
|
|
|
115
116
|
defaultItem.text = defaultItem.localizationKey ? localization.toLanguageString(defaultItem.localizationKey, messages_1.messages[defaultItem.localizationKey]) : defaultItem.text;
|
|
116
117
|
}
|
|
117
118
|
|
|
118
|
-
var value = new Set(styles).size === 1 ? styles[0] : null;
|
|
119
|
-
|
|
120
119
|
var ddlProps = __assign(__assign(__assign({}, other), {
|
|
121
120
|
value: value ? items.find(function (i) {
|
|
122
121
|
return i.value === value;
|
|
@@ -152,13 +151,13 @@ var FontNameVue2 = {
|
|
|
152
151
|
}, __spreadArrays(li.children))]) : li;
|
|
153
152
|
},
|
|
154
153
|
onChange: function onChange(e) {
|
|
155
|
-
var item = e.target.value;
|
|
156
154
|
var _a = this.$props,
|
|
157
155
|
view = _a.view,
|
|
158
156
|
settings = _a.settings;
|
|
159
157
|
var style = settings.style;
|
|
158
|
+
var item = e.target.value;
|
|
160
159
|
|
|
161
|
-
if (view
|
|
160
|
+
if (view) {
|
|
162
161
|
kendo_editor_common_1.applyInlineStyle({
|
|
163
162
|
style: style,
|
|
164
163
|
value: item.value
|