@progress/kendo-vue-editor 3.1.4 → 3.1.5-dev.202204110939
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 +28 -16
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/Editor.js +28 -16
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +12 -12
package/dist/es/Editor.js
CHANGED
|
@@ -281,7 +281,7 @@ var EditorVue2 = {
|
|
|
281
281
|
};
|
|
282
282
|
},
|
|
283
283
|
created: function created() {
|
|
284
|
-
this.
|
|
284
|
+
this._view = undefined;
|
|
285
285
|
validatePackage(packageMetadata);
|
|
286
286
|
},
|
|
287
287
|
mounted: function mounted() {
|
|
@@ -299,7 +299,7 @@ var EditorVue2 = {
|
|
|
299
299
|
},
|
|
300
300
|
updated: function updated() {
|
|
301
301
|
var value = this.$props.value;
|
|
302
|
-
var view = this.
|
|
302
|
+
var view = this.getView();
|
|
303
303
|
|
|
304
304
|
if (value === undefined || !view) {
|
|
305
305
|
return;
|
|
@@ -310,19 +310,21 @@ var EditorVue2 = {
|
|
|
310
310
|
this.htmlOnChange = null;
|
|
311
311
|
},
|
|
312
312
|
destroyed: !!gh ? undefined : function () {
|
|
313
|
-
if (this.
|
|
314
|
-
this.
|
|
313
|
+
if (this.getView()) {
|
|
314
|
+
this.getView().destroy();
|
|
315
315
|
}
|
|
316
316
|
|
|
317
317
|
this.view = undefined;
|
|
318
|
+
this._view = undefined;
|
|
318
319
|
},
|
|
319
320
|
// @ts-ignore
|
|
320
321
|
unmounted: function unmounted() {
|
|
321
|
-
if (this.
|
|
322
|
-
this.
|
|
322
|
+
if (this.getView()) {
|
|
323
|
+
this.getView().destroy();
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
this.view = undefined;
|
|
327
|
+
this._view = undefined;
|
|
326
328
|
},
|
|
327
329
|
computed: {
|
|
328
330
|
computedValue: function computedValue() {
|
|
@@ -330,8 +332,8 @@ var EditorVue2 = {
|
|
|
330
332
|
return this.trOnChange.doc;
|
|
331
333
|
} else if (this.$props.value !== undefined) {
|
|
332
334
|
return this.$props.value;
|
|
333
|
-
} else if (this.
|
|
334
|
-
return this.
|
|
335
|
+
} else if (this.getView()) {
|
|
336
|
+
return this.getView().state.doc;
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
return this.$props.defaultContent || '';
|
|
@@ -491,7 +493,7 @@ var EditorVue2 = {
|
|
|
491
493
|
},
|
|
492
494
|
methods: {
|
|
493
495
|
getView: function getView() {
|
|
494
|
-
return this.view;
|
|
496
|
+
return this.v3 ? this.view : this._view;
|
|
495
497
|
},
|
|
496
498
|
getHTML: function getHTML() {
|
|
497
499
|
var view = this.getView();
|
|
@@ -510,12 +512,16 @@ var EditorVue2 = {
|
|
|
510
512
|
}
|
|
511
513
|
},
|
|
512
514
|
focus: function focus() {
|
|
513
|
-
if (this.
|
|
514
|
-
this.
|
|
515
|
+
if (this.getView()) {
|
|
516
|
+
this.getView().focus();
|
|
515
517
|
}
|
|
516
518
|
},
|
|
517
519
|
updateTools: function updateTools(view) {
|
|
518
|
-
this.
|
|
520
|
+
if (this.v3) {
|
|
521
|
+
this.view = view;
|
|
522
|
+
} else {
|
|
523
|
+
this._view = view;
|
|
524
|
+
}
|
|
519
525
|
|
|
520
526
|
if (this.v3) {
|
|
521
527
|
this.updateGuid = guid();
|
|
@@ -597,7 +603,8 @@ var EditorVue2 = {
|
|
|
597
603
|
})), {
|
|
598
604
|
'Mod-k': function ModK() {
|
|
599
605
|
var linkDialog = _this.$data.linkDialog;
|
|
600
|
-
|
|
606
|
+
|
|
607
|
+
var editorView = _this.getView();
|
|
601
608
|
|
|
602
609
|
if (editorView) {
|
|
603
610
|
var editorState = editorView.state;
|
|
@@ -648,7 +655,12 @@ var EditorVue2 = {
|
|
|
648
655
|
var view = this.$props.extendView && this.$props.extendView(mountEvent) || new EditorView({
|
|
649
656
|
mount: dom
|
|
650
657
|
}, viewProps);
|
|
651
|
-
|
|
658
|
+
|
|
659
|
+
if (this.v3) {
|
|
660
|
+
this.view = markRaw(view);
|
|
661
|
+
} else {
|
|
662
|
+
this._view = view;
|
|
663
|
+
}
|
|
652
664
|
},
|
|
653
665
|
filterTransaction: function filterTransaction(transaction, state) {
|
|
654
666
|
var event = {
|
|
@@ -702,8 +714,8 @@ var EditorVue2 = {
|
|
|
702
714
|
this.$emit('change', event_2);
|
|
703
715
|
}
|
|
704
716
|
|
|
705
|
-
if (this.
|
|
706
|
-
this.
|
|
717
|
+
if (this.getView() && (this.$props.value === undefined || !docChanged)) {
|
|
718
|
+
this.getView().updateState(this.getView().state.apply(transaction));
|
|
707
719
|
}
|
|
708
720
|
},
|
|
709
721
|
onFocus: function onFocus(_view, e) {
|
|
@@ -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: 1649669534,
|
|
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
|
};
|
package/dist/npm/Editor.js
CHANGED
|
@@ -321,7 +321,7 @@ var EditorVue2 = {
|
|
|
321
321
|
};
|
|
322
322
|
},
|
|
323
323
|
created: function created() {
|
|
324
|
-
this.
|
|
324
|
+
this._view = undefined;
|
|
325
325
|
kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
|
|
326
326
|
},
|
|
327
327
|
mounted: function mounted() {
|
|
@@ -339,7 +339,7 @@ var EditorVue2 = {
|
|
|
339
339
|
},
|
|
340
340
|
updated: function updated() {
|
|
341
341
|
var value = this.$props.value;
|
|
342
|
-
var view = this.
|
|
342
|
+
var view = this.getView();
|
|
343
343
|
|
|
344
344
|
if (value === undefined || !view) {
|
|
345
345
|
return;
|
|
@@ -350,19 +350,21 @@ var EditorVue2 = {
|
|
|
350
350
|
this.htmlOnChange = null;
|
|
351
351
|
},
|
|
352
352
|
destroyed: !!gh ? undefined : function () {
|
|
353
|
-
if (this.
|
|
354
|
-
this.
|
|
353
|
+
if (this.getView()) {
|
|
354
|
+
this.getView().destroy();
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
this.view = undefined;
|
|
358
|
+
this._view = undefined;
|
|
358
359
|
},
|
|
359
360
|
// @ts-ignore
|
|
360
361
|
unmounted: function unmounted() {
|
|
361
|
-
if (this.
|
|
362
|
-
this.
|
|
362
|
+
if (this.getView()) {
|
|
363
|
+
this.getView().destroy();
|
|
363
364
|
}
|
|
364
365
|
|
|
365
366
|
this.view = undefined;
|
|
367
|
+
this._view = undefined;
|
|
366
368
|
},
|
|
367
369
|
computed: {
|
|
368
370
|
computedValue: function computedValue() {
|
|
@@ -370,8 +372,8 @@ var EditorVue2 = {
|
|
|
370
372
|
return this.trOnChange.doc;
|
|
371
373
|
} else if (this.$props.value !== undefined) {
|
|
372
374
|
return this.$props.value;
|
|
373
|
-
} else if (this.
|
|
374
|
-
return this.
|
|
375
|
+
} else if (this.getView()) {
|
|
376
|
+
return this.getView().state.doc;
|
|
375
377
|
}
|
|
376
378
|
|
|
377
379
|
return this.$props.defaultContent || '';
|
|
@@ -531,7 +533,7 @@ var EditorVue2 = {
|
|
|
531
533
|
},
|
|
532
534
|
methods: {
|
|
533
535
|
getView: function getView() {
|
|
534
|
-
return this.view;
|
|
536
|
+
return this.v3 ? this.view : this._view;
|
|
535
537
|
},
|
|
536
538
|
getHTML: function getHTML() {
|
|
537
539
|
var view = this.getView();
|
|
@@ -550,12 +552,16 @@ var EditorVue2 = {
|
|
|
550
552
|
}
|
|
551
553
|
},
|
|
552
554
|
focus: function focus() {
|
|
553
|
-
if (this.
|
|
554
|
-
this.
|
|
555
|
+
if (this.getView()) {
|
|
556
|
+
this.getView().focus();
|
|
555
557
|
}
|
|
556
558
|
},
|
|
557
559
|
updateTools: function updateTools(view) {
|
|
558
|
-
this.
|
|
560
|
+
if (this.v3) {
|
|
561
|
+
this.view = view;
|
|
562
|
+
} else {
|
|
563
|
+
this._view = view;
|
|
564
|
+
}
|
|
559
565
|
|
|
560
566
|
if (this.v3) {
|
|
561
567
|
this.updateGuid = kendo_vue_common_1.guid();
|
|
@@ -637,7 +643,8 @@ var EditorVue2 = {
|
|
|
637
643
|
})), {
|
|
638
644
|
'Mod-k': function ModK() {
|
|
639
645
|
var linkDialog = _this.$data.linkDialog;
|
|
640
|
-
|
|
646
|
+
|
|
647
|
+
var editorView = _this.getView();
|
|
641
648
|
|
|
642
649
|
if (editorView) {
|
|
643
650
|
var editorState = editorView.state;
|
|
@@ -688,7 +695,12 @@ var EditorVue2 = {
|
|
|
688
695
|
var view = this.$props.extendView && this.$props.extendView(mountEvent) || new kendo_editor_common_1.EditorView({
|
|
689
696
|
mount: dom
|
|
690
697
|
}, viewProps);
|
|
691
|
-
|
|
698
|
+
|
|
699
|
+
if (this.v3) {
|
|
700
|
+
this.view = markRaw(view);
|
|
701
|
+
} else {
|
|
702
|
+
this._view = view;
|
|
703
|
+
}
|
|
692
704
|
},
|
|
693
705
|
filterTransaction: function filterTransaction(transaction, state) {
|
|
694
706
|
var event = {
|
|
@@ -742,8 +754,8 @@ var EditorVue2 = {
|
|
|
742
754
|
this.$emit('change', event_2);
|
|
743
755
|
}
|
|
744
756
|
|
|
745
|
-
if (this.
|
|
746
|
-
this.
|
|
757
|
+
if (this.getView() && (this.$props.value === undefined || !docChanged)) {
|
|
758
|
+
this.getView().updateState(this.getView().state.apply(transaction));
|
|
747
759
|
}
|
|
748
760
|
},
|
|
749
761
|
onFocus: function onFocus(_view, e) {
|
|
@@ -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: 1649669534,
|
|
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
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-editor",
|
|
3
3
|
"description": "Kendo UI for Vue Editor package",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.5-dev.202204110939",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-vue.git"
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@progress/kendo-editor-common": "1.8.0",
|
|
46
|
-
"@progress/kendo-vue-common": "3.1.
|
|
46
|
+
"@progress/kendo-vue-common": "3.1.5-dev.202204110939"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@progress/kendo-drawing": "^1.8.0",
|
|
50
50
|
"@progress/kendo-licensing": "^1.0.1",
|
|
51
|
-
"@progress/kendo-vue-buttons": "3.1.
|
|
52
|
-
"@progress/kendo-vue-dialogs": "3.1.
|
|
53
|
-
"@progress/kendo-vue-dropdowns": "3.1.
|
|
54
|
-
"@progress/kendo-vue-form": "3.1.
|
|
55
|
-
"@progress/kendo-vue-inputs": "3.1.
|
|
56
|
-
"@progress/kendo-vue-intl": "3.1.
|
|
57
|
-
"@progress/kendo-vue-layout": "3.1.
|
|
58
|
-
"@progress/kendo-vue-pdf": "3.1.
|
|
59
|
-
"@progress/kendo-vue-popup": "3.1.
|
|
60
|
-
"@progress/kendo-vue-upload": "3.1.
|
|
51
|
+
"@progress/kendo-vue-buttons": "3.1.5-dev.202204110939",
|
|
52
|
+
"@progress/kendo-vue-dialogs": "3.1.5-dev.202204110939",
|
|
53
|
+
"@progress/kendo-vue-dropdowns": "3.1.5-dev.202204110939",
|
|
54
|
+
"@progress/kendo-vue-form": "3.1.5-dev.202204110939",
|
|
55
|
+
"@progress/kendo-vue-inputs": "3.1.5-dev.202204110939",
|
|
56
|
+
"@progress/kendo-vue-intl": "3.1.5-dev.202204110939",
|
|
57
|
+
"@progress/kendo-vue-layout": "3.1.5-dev.202204110939",
|
|
58
|
+
"@progress/kendo-vue-pdf": "3.1.5-dev.202204110939",
|
|
59
|
+
"@progress/kendo-vue-popup": "3.1.5-dev.202204110939",
|
|
60
|
+
"@progress/kendo-vue-upload": "3.1.5-dev.202204110939"
|
|
61
61
|
},
|
|
62
62
|
"@progress": {
|
|
63
63
|
"friendlyName": "Editor",
|