@progress/kendo-angular-editor 4.0.0 → 4.0.1-dev.202205191407
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/editor.component.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
|
|
|
134
134
|
*/
|
|
135
135
|
stateChange: BehaviorSubject<any>;
|
|
136
136
|
get toolbar(): ToolBarComponent;
|
|
137
|
+
get toolbarElement(): ElementRef;
|
|
137
138
|
/**
|
|
138
139
|
* Returns the ProseMirror [EditorView](https://prosemirror.net/docs/ref/#view.EditorView) object
|
|
139
140
|
* that manages the DOM structure that represents an editable document.
|
|
@@ -201,7 +201,7 @@ export class EditorComponent {
|
|
|
201
201
|
this.onChangeCallback = (value) => {
|
|
202
202
|
this.changeValue(value);
|
|
203
203
|
};
|
|
204
|
-
this.onTouchedCallback = (_) => { };
|
|
204
|
+
this.onTouchedCallback = (_) => { };
|
|
205
205
|
this.onPaste = (_view, nativeEvent) => {
|
|
206
206
|
this._pasteEvent = nativeEvent;
|
|
207
207
|
return false;
|
|
@@ -382,6 +382,9 @@ export class EditorComponent {
|
|
|
382
382
|
get toolbar() {
|
|
383
383
|
return this.defaultToolbarComponent || this.userToolBarComponent;
|
|
384
384
|
}
|
|
385
|
+
get toolbarElement() {
|
|
386
|
+
return this.defaultToolbar || this.userToolBarElement;
|
|
387
|
+
}
|
|
385
388
|
/**
|
|
386
389
|
* Returns the ProseMirror [EditorView](https://prosemirror.net/docs/ref/#view.EditorView) object
|
|
387
390
|
* that manages the DOM structure that represents an editable document.
|
|
@@ -402,6 +405,7 @@ export class EditorComponent {
|
|
|
402
405
|
this.subs.add(this.toolsService.needsCheck.subscribe(() => this.cdr.markForCheck()));
|
|
403
406
|
}
|
|
404
407
|
ngAfterViewInit() {
|
|
408
|
+
var _a;
|
|
405
409
|
this.afterViewInit.next();
|
|
406
410
|
if (!this.iframe) {
|
|
407
411
|
this.contentAreaLoaded.next();
|
|
@@ -409,6 +413,13 @@ export class EditorComponent {
|
|
|
409
413
|
if (this.resizable) {
|
|
410
414
|
this.normalizeSize();
|
|
411
415
|
}
|
|
416
|
+
// address edge cases for responsive toolbar tools
|
|
417
|
+
// calculations - https://github.com/telerik/kendo-angular/issues/3661
|
|
418
|
+
if ((_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.resizable) {
|
|
419
|
+
this.ngZone.runOutsideAngular(() => {
|
|
420
|
+
setTimeout(() => this.toolbar.onResize(), 70);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
412
423
|
}
|
|
413
424
|
ngOnChanges(changes) {
|
|
414
425
|
if (changes.value && this.view) {
|
|
@@ -741,7 +752,7 @@ export class EditorComponent {
|
|
|
741
752
|
}));
|
|
742
753
|
this.subs.add(fromEvent(this.viewMountElement, 'keyup')
|
|
743
754
|
.pipe(map((e) => e.keyCode), filter((code) => code === 121), // F10
|
|
744
|
-
map(() => this.
|
|
755
|
+
map(() => this.toolbarElement))
|
|
745
756
|
.subscribe((toolbar) => toolbar.nativeElement.focus()));
|
|
746
757
|
this.subs.add(fromEvent(this.viewMountElement, 'blur')
|
|
747
758
|
.pipe(filter((event) => !this.viewMountElement.contains(event.relatedTarget)))
|
|
@@ -820,7 +831,7 @@ EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
820
831
|
provide: KendoInput,
|
|
821
832
|
useExisting: forwardRef(() => EditorComponent)
|
|
822
833
|
}
|
|
823
|
-
], queries: [{ propertyName: "userToolBarComponent", first: true, predicate: ToolBarComponent, descendants: true }, { propertyName: "userToolBarElement", first: true, predicate: ToolBarComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "dialogContainer", first: true, predicate: ["dialogsContainer"], descendants: true, read: ViewContainerRef
|
|
834
|
+
], queries: [{ propertyName: "userToolBarComponent", first: true, predicate: ToolBarComponent, descendants: true }, { propertyName: "userToolBarElement", first: true, predicate: ToolBarComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "dialogContainer", first: true, predicate: ["dialogsContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "container", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef }, { propertyName: "defaultToolbar", first: true, predicate: ["defaultToolbar"], descendants: true, read: ElementRef }, { propertyName: "defaultToolbarComponent", first: true, predicate: ["defaultToolbar"], descendants: true, read: ToolBarComponent }], usesOnChanges: true, ngImport: i0, template: `
|
|
824
835
|
<ng-container
|
|
825
836
|
kendoEditorLocalizedMessages
|
|
826
837
|
i18n-alignCenter="kendo.editor.alignCenter|The title of the tool that aligns text in the center."
|
|
@@ -931,7 +942,6 @@ EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
931
942
|
deleteTable="Delete table"
|
|
932
943
|
>
|
|
933
944
|
</ng-container>
|
|
934
|
-
|
|
935
945
|
<ng-content select="kendo-toolbar"></ng-content>
|
|
936
946
|
<kendo-toolbar [overflow]="true" [tabindex]="readonly ? -1 : 0" *ngIf="!userToolBarElement" #defaultToolbar>
|
|
937
947
|
<kendo-toolbar-buttongroup>
|
|
@@ -1104,7 +1114,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1104
1114
|
deleteTable="Delete table"
|
|
1105
1115
|
>
|
|
1106
1116
|
</ng-container>
|
|
1107
|
-
|
|
1108
1117
|
<ng-content select="kendo-toolbar"></ng-content>
|
|
1109
1118
|
<kendo-toolbar [overflow]="true" [tabindex]="readonly ? -1 : 0" *ngIf="!userToolBarElement" #defaultToolbar>
|
|
1110
1119
|
<kendo-toolbar-buttongroup>
|
|
@@ -1225,16 +1234,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1225
1234
|
args: ['style.maxHeight']
|
|
1226
1235
|
}], userToolBarComponent: [{
|
|
1227
1236
|
type: ContentChild,
|
|
1228
|
-
args: [ToolBarComponent
|
|
1237
|
+
args: [ToolBarComponent]
|
|
1229
1238
|
}], userToolBarElement: [{
|
|
1230
1239
|
type: ContentChild,
|
|
1231
|
-
args: [ToolBarComponent, { read: ElementRef
|
|
1240
|
+
args: [ToolBarComponent, { read: ElementRef }]
|
|
1232
1241
|
}], dialogContainer: [{
|
|
1233
1242
|
type: ViewChild,
|
|
1234
|
-
args: ['dialogsContainer', { read: ViewContainerRef
|
|
1243
|
+
args: ['dialogsContainer', { read: ViewContainerRef }]
|
|
1235
1244
|
}], container: [{
|
|
1236
1245
|
type: ViewChild,
|
|
1237
|
-
args: ['content', { read: ViewContainerRef
|
|
1246
|
+
args: ['content', { read: ViewContainerRef }]
|
|
1238
1247
|
}], defaultToolbar: [{
|
|
1239
1248
|
type: ViewChild,
|
|
1240
1249
|
args: ['defaultToolbar', { read: ElementRef, static: false }]
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-editor',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1652969231,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -35,7 +35,7 @@ const packageMetadata = {
|
|
|
35
35
|
name: '@progress/kendo-angular-editor',
|
|
36
36
|
productName: 'Kendo UI for Angular',
|
|
37
37
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
38
|
-
publishDate:
|
|
38
|
+
publishDate: 1652969231,
|
|
39
39
|
version: '',
|
|
40
40
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
41
41
|
};
|
|
@@ -2823,7 +2823,7 @@ class EditorComponent {
|
|
|
2823
2823
|
this.onChangeCallback = (value) => {
|
|
2824
2824
|
this.changeValue(value);
|
|
2825
2825
|
};
|
|
2826
|
-
this.onTouchedCallback = (_) => { };
|
|
2826
|
+
this.onTouchedCallback = (_) => { };
|
|
2827
2827
|
this.onPaste = (_view, nativeEvent) => {
|
|
2828
2828
|
this._pasteEvent = nativeEvent;
|
|
2829
2829
|
return false;
|
|
@@ -3004,6 +3004,9 @@ class EditorComponent {
|
|
|
3004
3004
|
get toolbar() {
|
|
3005
3005
|
return this.defaultToolbarComponent || this.userToolBarComponent;
|
|
3006
3006
|
}
|
|
3007
|
+
get toolbarElement() {
|
|
3008
|
+
return this.defaultToolbar || this.userToolBarElement;
|
|
3009
|
+
}
|
|
3007
3010
|
/**
|
|
3008
3011
|
* Returns the ProseMirror [EditorView](https://prosemirror.net/docs/ref/#view.EditorView) object
|
|
3009
3012
|
* that manages the DOM structure that represents an editable document.
|
|
@@ -3024,6 +3027,7 @@ class EditorComponent {
|
|
|
3024
3027
|
this.subs.add(this.toolsService.needsCheck.subscribe(() => this.cdr.markForCheck()));
|
|
3025
3028
|
}
|
|
3026
3029
|
ngAfterViewInit() {
|
|
3030
|
+
var _a;
|
|
3027
3031
|
this.afterViewInit.next();
|
|
3028
3032
|
if (!this.iframe) {
|
|
3029
3033
|
this.contentAreaLoaded.next();
|
|
@@ -3031,6 +3035,13 @@ class EditorComponent {
|
|
|
3031
3035
|
if (this.resizable) {
|
|
3032
3036
|
this.normalizeSize();
|
|
3033
3037
|
}
|
|
3038
|
+
// address edge cases for responsive toolbar tools
|
|
3039
|
+
// calculations - https://github.com/telerik/kendo-angular/issues/3661
|
|
3040
|
+
if ((_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.resizable) {
|
|
3041
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3042
|
+
setTimeout(() => this.toolbar.onResize(), 70);
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3034
3045
|
}
|
|
3035
3046
|
ngOnChanges(changes) {
|
|
3036
3047
|
if (changes.value && this.view) {
|
|
@@ -3363,7 +3374,7 @@ class EditorComponent {
|
|
|
3363
3374
|
}));
|
|
3364
3375
|
this.subs.add(fromEvent(this.viewMountElement, 'keyup')
|
|
3365
3376
|
.pipe(map((e) => e.keyCode), filter$1((code) => code === 121), // F10
|
|
3366
|
-
map(() => this.
|
|
3377
|
+
map(() => this.toolbarElement))
|
|
3367
3378
|
.subscribe((toolbar) => toolbar.nativeElement.focus()));
|
|
3368
3379
|
this.subs.add(fromEvent(this.viewMountElement, 'blur')
|
|
3369
3380
|
.pipe(filter$1((event) => !this.viewMountElement.contains(event.relatedTarget)))
|
|
@@ -3442,7 +3453,7 @@ EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
3442
3453
|
provide: KendoInput,
|
|
3443
3454
|
useExisting: forwardRef(() => EditorComponent)
|
|
3444
3455
|
}
|
|
3445
|
-
], queries: [{ propertyName: "userToolBarComponent", first: true, predicate: ToolBarComponent, descendants: true }, { propertyName: "userToolBarElement", first: true, predicate: ToolBarComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "dialogContainer", first: true, predicate: ["dialogsContainer"], descendants: true, read: ViewContainerRef
|
|
3456
|
+
], queries: [{ propertyName: "userToolBarComponent", first: true, predicate: ToolBarComponent, descendants: true }, { propertyName: "userToolBarElement", first: true, predicate: ToolBarComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "dialogContainer", first: true, predicate: ["dialogsContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "container", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef }, { propertyName: "defaultToolbar", first: true, predicate: ["defaultToolbar"], descendants: true, read: ElementRef }, { propertyName: "defaultToolbarComponent", first: true, predicate: ["defaultToolbar"], descendants: true, read: ToolBarComponent }], usesOnChanges: true, ngImport: i0, template: `
|
|
3446
3457
|
<ng-container
|
|
3447
3458
|
kendoEditorLocalizedMessages
|
|
3448
3459
|
i18n-alignCenter="kendo.editor.alignCenter|The title of the tool that aligns text in the center."
|
|
@@ -3553,7 +3564,6 @@ EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
3553
3564
|
deleteTable="Delete table"
|
|
3554
3565
|
>
|
|
3555
3566
|
</ng-container>
|
|
3556
|
-
|
|
3557
3567
|
<ng-content select="kendo-toolbar"></ng-content>
|
|
3558
3568
|
<kendo-toolbar [overflow]="true" [tabindex]="readonly ? -1 : 0" *ngIf="!userToolBarElement" #defaultToolbar>
|
|
3559
3569
|
<kendo-toolbar-buttongroup>
|
|
@@ -3726,7 +3736,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3726
3736
|
deleteTable="Delete table"
|
|
3727
3737
|
>
|
|
3728
3738
|
</ng-container>
|
|
3729
|
-
|
|
3730
3739
|
<ng-content select="kendo-toolbar"></ng-content>
|
|
3731
3740
|
<kendo-toolbar [overflow]="true" [tabindex]="readonly ? -1 : 0" *ngIf="!userToolBarElement" #defaultToolbar>
|
|
3732
3741
|
<kendo-toolbar-buttongroup>
|
|
@@ -3847,16 +3856,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3847
3856
|
args: ['style.maxHeight']
|
|
3848
3857
|
}], userToolBarComponent: [{
|
|
3849
3858
|
type: ContentChild,
|
|
3850
|
-
args: [ToolBarComponent
|
|
3859
|
+
args: [ToolBarComponent]
|
|
3851
3860
|
}], userToolBarElement: [{
|
|
3852
3861
|
type: ContentChild,
|
|
3853
|
-
args: [ToolBarComponent, { read: ElementRef
|
|
3862
|
+
args: [ToolBarComponent, { read: ElementRef }]
|
|
3854
3863
|
}], dialogContainer: [{
|
|
3855
3864
|
type: ViewChild,
|
|
3856
|
-
args: ['dialogsContainer', { read: ViewContainerRef
|
|
3865
|
+
args: ['dialogsContainer', { read: ViewContainerRef }]
|
|
3857
3866
|
}], container: [{
|
|
3858
3867
|
type: ViewChild,
|
|
3859
|
-
args: ['content', { read: ViewContainerRef
|
|
3868
|
+
args: ['content', { read: ViewContainerRef }]
|
|
3860
3869
|
}], defaultToolbar: [{
|
|
3861
3870
|
type: ViewChild,
|
|
3862
3871
|
args: ['defaultToolbar', { read: ElementRef, static: false }]
|
package/main.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export { EditorComponent } from './editor.component';
|
|
6
6
|
export { EditorModule } from './editor.module';
|
|
7
7
|
export { schema, Schema } from './config/schema';
|
|
8
|
-
export { EditorState, Plugin, PluginKey, Transaction, EditorView, Decoration, DecorationSet, NodeType, Node, MarkType, Mark, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, baseKeymap, history, dropCursor, gapCursor, tableNodes } from '@progress/kendo-editor-common';
|
|
8
|
+
export { EditorState, Plugin, PluginKey, Transaction, EditorView, Decoration, DecorationSet, NodeType, Node, MarkType, Mark, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, baseKeymap, history, dropCursor, gapCursor, tableNodes, NodeSpec, MarkSpec } from '@progress/kendo-editor-common';
|
|
9
9
|
export { getSelectionText } from './util';
|
|
10
10
|
export { PluginsFn } from './common/plugins-function';
|
|
11
11
|
export { ApplyToWordOptions } from './common/apply-to-word-options';
|