@progress/kendo-angular-editor 11.0.0-develop.99 → 11.0.0
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 +17 -17
- package/config/command-icons.d.ts +4 -0
- package/dialogs/colorpicker-dialog.component.d.ts +2 -0
- package/dialogs/file-link-dialog.component.d.ts +2 -2
- package/dialogs/image-dialog.component.d.ts +2 -2
- package/dialogs/source-dialog.component.d.ts +2 -2
- package/editor.component.d.ts +3 -2
- package/editor.module.d.ts +4 -2
- package/esm2020/config/command-icons.mjs +45 -0
- package/esm2020/dialogs/colorpicker-dialog.component.mjs +29 -34
- package/esm2020/dialogs/file-link-dialog.component.mjs +79 -77
- package/esm2020/dialogs/font-family-dialog.component.mjs +20 -28
- package/esm2020/dialogs/font-size-dialog.component.mjs +20 -28
- package/esm2020/dialogs/format-dialog.component.mjs +20 -28
- package/esm2020/dialogs/image-dialog.component.mjs +74 -63
- package/esm2020/dialogs/insert-table-dialog.component.mjs +6 -14
- package/esm2020/dialogs/source-dialog.component.mjs +9 -7
- package/esm2020/editor.component.mjs +31 -10
- package/esm2020/editor.module.mjs +15 -4
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/tools/colorpicker/editor-back-color.directive.mjs +2 -1
- package/esm2020/tools/colorpicker/editor-colorpicker.component.mjs +53 -37
- package/esm2020/tools/colorpicker/editor-fore-color.directive.mjs +2 -1
- package/esm2020/tools/fontfamily/editor-fontfamily.component.mjs +36 -31
- package/esm2020/tools/fontsize/editor-fontsize.component.mjs +35 -31
- package/esm2020/tools/format/editor-format.component.mjs +35 -33
- package/esm2020/tools/shared/editor-command-base.mjs +20 -13
- package/esm2020/tools/shared/editor-command-button.mjs +10 -2
- package/esm2020/tools/shared/editor-command-dialog.mjs +10 -2
- package/esm2020/tools/tables/editor-insert-table-button.component.mjs +36 -23
- package/esm2020/tools/tables/popup-table-grid.component.mjs +4 -2
- package/esm2020/tools/tools.service.mjs +5 -4
- package/fesm2015/progress-kendo-angular-editor.mjs +571 -464
- package/fesm2020/progress-kendo-angular-editor.mjs +570 -464
- package/package.json +16 -15
- package/schematics/ngAdd/index.js +5 -3
- package/tools/colorpicker/editor-colorpicker.component.d.ts +10 -3
- package/tools/fontfamily/editor-fontfamily.component.d.ts +5 -2
- package/tools/fontsize/editor-fontsize.component.d.ts +5 -2
- package/tools/format/editor-format.component.d.ts +5 -2
- package/tools/tables/editor-insert-table-button.component.d.ts +5 -2
- package/tools/tables/popup-table-grid.component.d.ts +2 -0
- package/tools/tools.service.d.ts +3 -0
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, Input, ViewChild
|
|
5
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
|
6
6
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
|
7
7
|
import { DialogRef, DialogContentBase } from '@progress/kendo-angular-dialog';
|
|
8
8
|
import { getNodeFromSelection } from '@progress/kendo-editor-common';
|
|
9
9
|
import { safeString } from '../util';
|
|
10
10
|
import { EditorLocalizationService } from '../localization/editor-localization.service';
|
|
11
11
|
import { guid } from '@progress/kendo-angular-common';
|
|
12
|
+
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
import * as i1 from "@progress/kendo-angular-dialog";
|
|
14
15
|
import * as i2 from "../localization/editor-localization.service";
|
|
15
|
-
import * as i3 from "@progress/kendo-angular-
|
|
16
|
-
import * as i4 from "@angular
|
|
16
|
+
import * as i3 from "@progress/kendo-angular-label";
|
|
17
|
+
import * as i4 from "@progress/kendo-angular-inputs";
|
|
18
|
+
import * as i5 from "@progress/kendo-angular-buttons";
|
|
19
|
+
import * as i6 from "@angular/forms";
|
|
17
20
|
/**
|
|
18
21
|
* @hidden
|
|
19
22
|
*/
|
|
@@ -47,7 +50,7 @@ export class ImageDialogComponent extends DialogContentBase {
|
|
|
47
50
|
}
|
|
48
51
|
ngAfterViewInit() {
|
|
49
52
|
Promise.resolve(null).then(() => {
|
|
50
|
-
this.srcInput.
|
|
53
|
+
this.srcInput.focus();
|
|
51
54
|
});
|
|
52
55
|
}
|
|
53
56
|
onCancelAction() {
|
|
@@ -85,46 +88,50 @@ export class ImageDialogComponent extends DialogContentBase {
|
|
|
85
88
|
}
|
|
86
89
|
}
|
|
87
90
|
ImageDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ImageDialogComponent, deps: [{ token: i1.DialogRef }, { token: i2.EditorLocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
88
|
-
ImageDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ImageDialogComponent, selector: "ng-component", inputs: { editor: "editor" }, viewQueries: [{ propertyName: "srcInput", first: true, predicate: ["srcInput"], descendants: true
|
|
91
|
+
ImageDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ImageDialogComponent, selector: "ng-component", inputs: { editor: "editor" }, viewQueries: [{ propertyName: "srcInput", first: true, predicate: ["srcInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
89
92
|
<kendo-dialog-titlebar (close)="onCancelAction()">
|
|
90
93
|
{{ textFor('insertImage') }}
|
|
91
94
|
</kendo-dialog-titlebar>
|
|
92
|
-
<div class="k-
|
|
93
|
-
<div class="k-
|
|
94
|
-
<div class="k-
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
95
|
+
<div class="k-form k-form-md k-form-horizontal">
|
|
96
|
+
<div class="k-form-field">
|
|
97
|
+
<div class="k-form-label">
|
|
98
|
+
<kendo-label [for]="srcInput" [text]="textFor('imageWebAddress')"></kendo-label>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="k-form-field-wrap">
|
|
101
|
+
<kendo-textbox #srcInput [formControl]="src"></kendo-textbox>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="k-form-field">
|
|
105
|
+
<div class="k-form-label">
|
|
106
|
+
<kendo-label [for]="altTextInput" [text]="textFor('imageAltText')"></kendo-label>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="k-form-field-wrap">
|
|
109
|
+
<kendo-textbox #altTextInput [formControl]="alt"></kendo-textbox>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="k-form-field">
|
|
113
|
+
<div class="k-form-label">
|
|
114
|
+
<kendo-label [for]="widthInput" [text]="textFor('imageWidth')"></kendo-label>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="k-form-field-wrap">
|
|
117
|
+
<kendo-textbox #widthInput [formControl]="width"></kendo-textbox>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="k-form-field">
|
|
121
|
+
<div class="k-form-label">
|
|
122
|
+
<kendo-label [for]="heightInput" [text]="textFor('imageHeight')"></kendo-label>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="k-form-field-wrap">
|
|
125
|
+
<kendo-textbox #heightInput [formControl]="height"></kendo-textbox>
|
|
119
126
|
</div>
|
|
120
127
|
</div>
|
|
121
128
|
</div>
|
|
122
|
-
<kendo-dialog-actions>
|
|
129
|
+
<kendo-dialog-actions class="k-actions-end k-actions-horizontal k-window-actions" [layout]="'normal'">
|
|
123
130
|
<button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
|
|
124
131
|
<button kendoButton [disabled]="imageData.invalid"
|
|
125
132
|
(click)="onConfirmAction()" [primary]="true">{{ textFor('dialogInsert') }}</button>
|
|
126
133
|
</kendo-dialog-actions>
|
|
127
|
-
`, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { type:
|
|
134
|
+
`, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional"], exportAs: ["kendoLabel"] }, { type: i4.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "errorIcon", "clearButtonIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { type: i5.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
128
135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ImageDialogComponent, decorators: [{
|
|
129
136
|
type: Component,
|
|
130
137
|
args: [{
|
|
@@ -132,37 +139,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
132
139
|
<kendo-dialog-titlebar (close)="onCancelAction()">
|
|
133
140
|
{{ textFor('insertImage') }}
|
|
134
141
|
</kendo-dialog-titlebar>
|
|
135
|
-
<div class="k-
|
|
136
|
-
<div class="k-
|
|
137
|
-
<div class="k-
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
142
|
+
<div class="k-form k-form-md k-form-horizontal">
|
|
143
|
+
<div class="k-form-field">
|
|
144
|
+
<div class="k-form-label">
|
|
145
|
+
<kendo-label [for]="srcInput" [text]="textFor('imageWebAddress')"></kendo-label>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="k-form-field-wrap">
|
|
148
|
+
<kendo-textbox #srcInput [formControl]="src"></kendo-textbox>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="k-form-field">
|
|
152
|
+
<div class="k-form-label">
|
|
153
|
+
<kendo-label [for]="altTextInput" [text]="textFor('imageAltText')"></kendo-label>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="k-form-field-wrap">
|
|
156
|
+
<kendo-textbox #altTextInput [formControl]="alt"></kendo-textbox>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="k-form-field">
|
|
160
|
+
<div class="k-form-label">
|
|
161
|
+
<kendo-label [for]="widthInput" [text]="textFor('imageWidth')"></kendo-label>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="k-form-field-wrap">
|
|
164
|
+
<kendo-textbox #widthInput [formControl]="width"></kendo-textbox>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="k-form-field">
|
|
168
|
+
<div class="k-form-label">
|
|
169
|
+
<kendo-label [for]="heightInput" [text]="textFor('imageHeight')"></kendo-label>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="k-form-field-wrap">
|
|
172
|
+
<kendo-textbox #heightInput [formControl]="height"></kendo-textbox>
|
|
162
173
|
</div>
|
|
163
174
|
</div>
|
|
164
175
|
</div>
|
|
165
|
-
<kendo-dialog-actions>
|
|
176
|
+
<kendo-dialog-actions class="k-actions-end k-actions-horizontal k-window-actions" [layout]="'normal'">
|
|
166
177
|
<button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
|
|
167
178
|
<button kendoButton [disabled]="imageData.invalid"
|
|
168
179
|
(click)="onConfirmAction()" [primary]="true">{{ textFor('dialogInsert') }}</button>
|
|
@@ -173,5 +184,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
173
184
|
type: Input
|
|
174
185
|
}], srcInput: [{
|
|
175
186
|
type: ViewChild,
|
|
176
|
-
args: ['srcInput'
|
|
187
|
+
args: ['srcInput']
|
|
177
188
|
}] } });
|
|
@@ -41,14 +41,10 @@ InsertTableDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
41
41
|
<kendo-dialog-titlebar (close)="onCancelAction()">
|
|
42
42
|
{{ textFor('insertTable') }}
|
|
43
43
|
</kendo-dialog-titlebar>
|
|
44
|
-
<div
|
|
45
|
-
<
|
|
46
|
-
<div class="k-ct-popup k-window-content" [style.text-align]="'center'">
|
|
47
|
-
<kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
44
|
+
<div [style.text-align]="'center'">
|
|
45
|
+
<kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid>
|
|
50
46
|
</div>
|
|
51
|
-
<kendo-dialog-actions>
|
|
47
|
+
<kendo-dialog-actions class="k-actions-end k-actions-horizontal k-window-actions" [layout]="'normal'">
|
|
52
48
|
<button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
|
|
53
49
|
</kendo-dialog-actions>
|
|
54
50
|
`, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.PopupTableGridComponent, selector: "kendo-popup-table-grid", outputs: ["cellClick", "tableWizardClick"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { type: i4.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
@@ -59,14 +55,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
59
55
|
<kendo-dialog-titlebar (close)="onCancelAction()">
|
|
60
56
|
{{ textFor('insertTable') }}
|
|
61
57
|
</kendo-dialog-titlebar>
|
|
62
|
-
<div
|
|
63
|
-
<
|
|
64
|
-
<div class="k-ct-popup k-window-content" [style.text-align]="'center'">
|
|
65
|
-
<kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
58
|
+
<div [style.text-align]="'center'">
|
|
59
|
+
<kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid>
|
|
68
60
|
</div>
|
|
69
|
-
<kendo-dialog-actions>
|
|
61
|
+
<kendo-dialog-actions class="k-actions-end k-actions-horizontal k-window-actions" [layout]="'normal'">
|
|
70
62
|
<button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
|
|
71
63
|
</kendo-dialog-actions>
|
|
72
64
|
`
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ViewChild,
|
|
5
|
+
import { Component, ViewChild, Input } from '@angular/core';
|
|
6
6
|
// import { EditorService } from '../editor.service';
|
|
7
7
|
import { DialogRef, DialogContentBase } from '@progress/kendo-angular-dialog';
|
|
8
|
+
import { TextAreaComponent } from '@progress/kendo-angular-inputs';
|
|
8
9
|
import { EditorLocalizationService } from '../localization/editor-localization.service';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
import * as i1 from "@progress/kendo-angular-dialog";
|
|
11
12
|
import * as i2 from "../localization/editor-localization.service";
|
|
12
|
-
import * as i3 from "@progress/kendo-angular-
|
|
13
|
+
import * as i3 from "@progress/kendo-angular-inputs";
|
|
14
|
+
import * as i4 from "@progress/kendo-angular-buttons";
|
|
13
15
|
/**
|
|
14
16
|
* @hidden
|
|
15
17
|
*/
|
|
@@ -22,7 +24,7 @@ export class SourceDialogComponent extends DialogContentBase {
|
|
|
22
24
|
}
|
|
23
25
|
ngAfterViewInit() {
|
|
24
26
|
Promise.resolve(null).then(() => {
|
|
25
|
-
this.textarea.
|
|
27
|
+
this.textarea.focus();
|
|
26
28
|
});
|
|
27
29
|
}
|
|
28
30
|
onCancelAction() {
|
|
@@ -34,7 +36,7 @@ export class SourceDialogComponent extends DialogContentBase {
|
|
|
34
36
|
this.editor.view.focus();
|
|
35
37
|
}
|
|
36
38
|
getData() {
|
|
37
|
-
return this.textarea.
|
|
39
|
+
return this.textarea.value;
|
|
38
40
|
}
|
|
39
41
|
setData() {
|
|
40
42
|
this.data = this.indent(this.editor.getSource());
|
|
@@ -55,12 +57,12 @@ SourceDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
55
57
|
<kendo-dialog-titlebar (close)="onCancelAction()">
|
|
56
58
|
{{ textFor('viewSource') }}
|
|
57
59
|
</kendo-dialog-titlebar>
|
|
58
|
-
<textarea [value]="data" #textarea
|
|
60
|
+
<kendo-textarea [value]="data" #textarea [style.height.%]="100"></kendo-textarea>
|
|
59
61
|
<kendo-dialog-actions>
|
|
60
62
|
<button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
|
|
61
63
|
<button kendoButton (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogUpdate') }}</button>
|
|
62
64
|
</kendo-dialog-actions>
|
|
63
|
-
`, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { type:
|
|
65
|
+
`, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "rows", "cols", "maxlength", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { type: i4.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
64
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SourceDialogComponent, decorators: [{
|
|
65
67
|
type: Component,
|
|
66
68
|
args: [{
|
|
@@ -68,7 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
68
70
|
<kendo-dialog-titlebar (close)="onCancelAction()">
|
|
69
71
|
{{ textFor('viewSource') }}
|
|
70
72
|
</kendo-dialog-titlebar>
|
|
71
|
-
<textarea [value]="data" #textarea
|
|
73
|
+
<kendo-textarea [value]="data" #textarea [style.height.%]="100"></kendo-textarea>
|
|
72
74
|
<kendo-dialog-actions>
|
|
73
75
|
<button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
|
|
74
76
|
<button kendoButton (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogUpdate') }}</button>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, HostBinding, ViewChild, ContentChild, ViewContainerRef, Output, ElementRef, EventEmitter, forwardRef, Input, ChangeDetectorRef, NgZone, isDevMode } from '@angular/core';
|
|
5
|
+
import { Component, HostBinding, ViewChild, ContentChild, ViewContainerRef, Output, ElementRef, EventEmitter, forwardRef, Input, ChangeDetectorRef, NgZone, isDevMode, Renderer2 } from '@angular/core';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { BehaviorSubject, fromEvent, Subject, zip } from 'rxjs';
|
|
8
8
|
import { map, filter, take } from 'rxjs/operators';
|
|
@@ -75,7 +75,7 @@ const getPasteCleanupAttributes = (config) => {
|
|
|
75
75
|
* Represents the [Kendo UI Editor component for Angular]({% slug overview_editor %}).
|
|
76
76
|
*/
|
|
77
77
|
export class EditorComponent {
|
|
78
|
-
constructor(dialogService, localization, cdr, ngZone, element, providerService, toolsService) {
|
|
78
|
+
constructor(dialogService, localization, cdr, ngZone, element, providerService, toolsService, renderer) {
|
|
79
79
|
this.dialogService = dialogService;
|
|
80
80
|
this.localization = localization;
|
|
81
81
|
this.cdr = cdr;
|
|
@@ -83,6 +83,7 @@ export class EditorComponent {
|
|
|
83
83
|
this.element = element;
|
|
84
84
|
this.providerService = providerService;
|
|
85
85
|
this.toolsService = toolsService;
|
|
86
|
+
this.renderer = renderer;
|
|
86
87
|
/**
|
|
87
88
|
* If set to `false`, the Editor will run in style non-encapsulated mode. This means
|
|
88
89
|
* that the styles of the page will be persisted in the Editor and its content will be affected by them.
|
|
@@ -426,6 +427,10 @@ export class EditorComponent {
|
|
|
426
427
|
if (this.resizable) {
|
|
427
428
|
this.normalizeSize();
|
|
428
429
|
}
|
|
430
|
+
if (this.userToolBarComponent) {
|
|
431
|
+
this.renderer.addClass(this.userToolBarComponent.element.nativeElement, 'k-editor-toolbar');
|
|
432
|
+
}
|
|
433
|
+
this.toolbar.onResize();
|
|
429
434
|
}
|
|
430
435
|
ngOnChanges(changes) {
|
|
431
436
|
if (changes['value'] && this.view) {
|
|
@@ -540,13 +545,16 @@ export class EditorComponent {
|
|
|
540
545
|
openDialog(dialogName) {
|
|
541
546
|
const editorDialogs = {
|
|
542
547
|
createLink: {
|
|
543
|
-
content: FileLinkDialogComponent
|
|
548
|
+
content: FileLinkDialogComponent,
|
|
549
|
+
width: 400
|
|
544
550
|
},
|
|
545
551
|
insertFile: {
|
|
546
|
-
content: FileLinkDialogComponent
|
|
552
|
+
content: FileLinkDialogComponent,
|
|
553
|
+
width: 400
|
|
547
554
|
},
|
|
548
555
|
insertImage: {
|
|
549
|
-
content: ImageDialogComponent
|
|
556
|
+
content: ImageDialogComponent,
|
|
557
|
+
width: 400
|
|
550
558
|
},
|
|
551
559
|
viewSource: {
|
|
552
560
|
content: SourceDialogComponent,
|
|
@@ -560,6 +568,7 @@ export class EditorComponent {
|
|
|
560
568
|
const dialog = Object.assign({ appendTo: this.dialogContainer }, editorDialogs[dialogName]);
|
|
561
569
|
this.toolbar.toggle(false);
|
|
562
570
|
const dialogContent = this.dialogService.open(dialog).content.instance;
|
|
571
|
+
this.renderer.addClass(dialogContent.dialog.dialog.instance.wrapper.nativeElement.querySelector('.k-window'), 'k-editor-window');
|
|
563
572
|
if (dialogName === 'createLink' || dialogName === 'insertFile') {
|
|
564
573
|
dialogContent.command = dialogName;
|
|
565
574
|
}
|
|
@@ -827,7 +836,7 @@ export class EditorComponent {
|
|
|
827
836
|
}
|
|
828
837
|
;
|
|
829
838
|
}
|
|
830
|
-
EditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EditorComponent, deps: [{ token: i1.DialogService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
839
|
+
EditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EditorComponent, deps: [{ token: i1.DialogService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i3.ProviderService }, { token: i4.EditorToolsService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
831
840
|
EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: EditorComponent, selector: "kendo-editor", inputs: { value: "value", disabled: "disabled", readonly: "readonly", iframe: "iframe", iframeCss: "iframeCss", applyToWord: "applyToWord", schema: "schema", plugins: "plugins", placeholder: "placeholder", preserveWhitespace: "preserveWhitespace", pasteCleanupSettings: "pasteCleanupSettings", resizable: "resizable" }, outputs: { valueChange: "valueChange", onFocus: "focus", paste: "paste", onBlur: "blur" }, host: { properties: { "class.k-editor": "this.hostClass", "class.k-editor-resizable": "this.resizableClass", "class.k-disabled": "this.isDisabled", "class.k-readonly": "this.isReadonly", "class.k-ie": "this.isIE", "attr.dir": "this.dir", "attr.ariaDisabled": "this.ariaDisabled", "style.minWidth": "this.minWidth", "style.maxWidth": "this.maxWidth", "style.minHeight": "this.minHeight", "style.maxHeight": "this.maxHeight" } }, providers: [
|
|
832
841
|
EditorLocalizationService,
|
|
833
842
|
ProviderService,
|
|
@@ -965,7 +974,13 @@ EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
965
974
|
>
|
|
966
975
|
</ng-container>
|
|
967
976
|
<ng-content select="kendo-toolbar"></ng-content>
|
|
968
|
-
<kendo-toolbar
|
|
977
|
+
<kendo-toolbar
|
|
978
|
+
#defaultToolbar
|
|
979
|
+
*ngIf="!userToolBarElement"
|
|
980
|
+
class="k-editor-toolbar"
|
|
981
|
+
[overflow]="true"
|
|
982
|
+
[tabindex]="readonly ? -1 : 0"
|
|
983
|
+
>
|
|
969
984
|
<kendo-toolbar-buttongroup>
|
|
970
985
|
<kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>
|
|
971
986
|
<kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>
|
|
@@ -998,7 +1013,7 @@ EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
998
1013
|
</div>
|
|
999
1014
|
|
|
1000
1015
|
<ng-container #dialogsContainer></ng-container>
|
|
1001
|
-
`, isInline: true, components: [{ type: i5.ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "tabindex", "tabIndex"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { type: i5.ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: ["disabled", "selection", "width", "look"], exportAs: ["kendoToolBarButtonGroup"] }, { type: i5.ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "themeColor", "icon", "iconClass", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { type: i6.EditorFormatComponent, selector: "kendo-toolbar-dropdownlist[kendoEditorFormat]", inputs: ["data"], outputs: ["valueChange"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "[kendoEditorLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.EditorBoldButtonDirective, selector: "kendo-toolbar-button[kendoEditorBoldButton]" }, { type: i10.EditorItalicButtonDirective, selector: "kendo-toolbar-button[kendoEditorItalicButton]" }, { type: i11.EditorUnderlineButtonDirective, selector: "kendo-toolbar-button[kendoEditorUnderlineButton]" }, { type: i12.EditorAlignLeftButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignLeftButton]" }, { type: i13.EditorAlignCenterButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignCenterButton]" }, { type: i14.EditorAlignRightButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignRightButton]" }, { type: i15.EditorAlignJustifyButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignJustifyButton]" }, { type: i16.EditorInsertUnorderedListButtonDirective, selector: "kendo-toolbar-button[kendoEditorInsertUnorderedListButton]" }, { type: i17.EditorInsertOrderedListButtonDirective, selector: "kendo-toolbar-button[kendoEditorInsertOrderedListButton]" }, { type: i18.EditorIndentButtonDirective, selector: "kendo-toolbar-button[kendoEditorIndentButton]" }, { type: i19.EditorOutdentButtonDirective, selector: "kendo-toolbar-button[kendoEditorOutdentButton]" }, { type: i20.EditorCreateLinkButtonDirective, selector: "kendo-toolbar-button[kendoEditorCreateLinkButton]" }, { type: i21.EditorUnlinkButtonDirective, selector: "kendo-toolbar-button[kendoEditorUnlinkButton]" }, { type: i22.EditorInsertImageButtonDirective, selector: "kendo-toolbar-button[kendoEditorInsertImageButton]" }] });
|
|
1016
|
+
`, isInline: true, components: [{ type: i5.ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "tabindex", "size", "tabIndex"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { type: i5.ToolBarButtonGroupComponent, selector: "kendo-toolbar-buttongroup", inputs: ["disabled", "selection", "width", "look"], exportAs: ["kendoToolBarButtonGroup"] }, { type: i5.ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { type: i6.EditorFormatComponent, selector: "kendo-toolbar-dropdownlist[kendoEditorFormat]", inputs: ["data"], outputs: ["valueChange"] }], directives: [{ type: i7.LocalizedMessagesDirective, selector: "[kendoEditorLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.EditorBoldButtonDirective, selector: "kendo-toolbar-button[kendoEditorBoldButton]" }, { type: i10.EditorItalicButtonDirective, selector: "kendo-toolbar-button[kendoEditorItalicButton]" }, { type: i11.EditorUnderlineButtonDirective, selector: "kendo-toolbar-button[kendoEditorUnderlineButton]" }, { type: i12.EditorAlignLeftButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignLeftButton]" }, { type: i13.EditorAlignCenterButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignCenterButton]" }, { type: i14.EditorAlignRightButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignRightButton]" }, { type: i15.EditorAlignJustifyButtonDirective, selector: "kendo-toolbar-button[kendoEditorAlignJustifyButton]" }, { type: i16.EditorInsertUnorderedListButtonDirective, selector: "kendo-toolbar-button[kendoEditorInsertUnorderedListButton]" }, { type: i17.EditorInsertOrderedListButtonDirective, selector: "kendo-toolbar-button[kendoEditorInsertOrderedListButton]" }, { type: i18.EditorIndentButtonDirective, selector: "kendo-toolbar-button[kendoEditorIndentButton]" }, { type: i19.EditorOutdentButtonDirective, selector: "kendo-toolbar-button[kendoEditorOutdentButton]" }, { type: i20.EditorCreateLinkButtonDirective, selector: "kendo-toolbar-button[kendoEditorCreateLinkButton]" }, { type: i21.EditorUnlinkButtonDirective, selector: "kendo-toolbar-button[kendoEditorUnlinkButton]" }, { type: i22.EditorInsertImageButtonDirective, selector: "kendo-toolbar-button[kendoEditorInsertImageButton]" }] });
|
|
1002
1017
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: EditorComponent, decorators: [{
|
|
1003
1018
|
type: Component,
|
|
1004
1019
|
args: [{
|
|
@@ -1141,7 +1156,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1141
1156
|
>
|
|
1142
1157
|
</ng-container>
|
|
1143
1158
|
<ng-content select="kendo-toolbar"></ng-content>
|
|
1144
|
-
<kendo-toolbar
|
|
1159
|
+
<kendo-toolbar
|
|
1160
|
+
#defaultToolbar
|
|
1161
|
+
*ngIf="!userToolBarElement"
|
|
1162
|
+
class="k-editor-toolbar"
|
|
1163
|
+
[overflow]="true"
|
|
1164
|
+
[tabindex]="readonly ? -1 : 0"
|
|
1165
|
+
>
|
|
1145
1166
|
<kendo-toolbar-buttongroup>
|
|
1146
1167
|
<kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>
|
|
1147
1168
|
<kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>
|
|
@@ -1176,7 +1197,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1176
1197
|
<ng-container #dialogsContainer></ng-container>
|
|
1177
1198
|
`
|
|
1178
1199
|
}]
|
|
1179
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i3.ProviderService }, { type: i4.EditorToolsService }]; }, propDecorators: { value: [{
|
|
1200
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i3.ProviderService }, { type: i4.EditorToolsService }, { type: i0.Renderer2 }]; }, propDecorators: { value: [{
|
|
1180
1201
|
type: Input
|
|
1181
1202
|
}], disabled: [{
|
|
1182
1203
|
type: Input
|
|
@@ -9,7 +9,9 @@ import { ToolBarModule } from '@progress/kendo-angular-toolbar';
|
|
|
9
9
|
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
10
10
|
import { DialogModule } from '@progress/kendo-angular-dialog';
|
|
11
11
|
import { ButtonModule } from '@progress/kendo-angular-buttons';
|
|
12
|
-
import { NumericTextBoxModule, TextBoxModule, ColorPickerModule, CheckBoxModule } from '@progress/kendo-angular-inputs';
|
|
12
|
+
import { NumericTextBoxModule, TextBoxModule, TextAreaModule, ColorPickerModule, CheckBoxModule } from '@progress/kendo-angular-inputs';
|
|
13
|
+
import { LabelModule } from "@progress/kendo-angular-label";
|
|
14
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
13
15
|
import { EditorComponent } from './editor.component';
|
|
14
16
|
import { ImageDialogComponent } from './dialogs/image-dialog.component';
|
|
15
17
|
import { SourceDialogComponent } from './dialogs/source-dialog.component';
|
|
@@ -284,8 +286,11 @@ EditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
284
286
|
DropDownsModule,
|
|
285
287
|
NumericTextBoxModule,
|
|
286
288
|
CheckBoxModule,
|
|
289
|
+
IconsModule,
|
|
287
290
|
ToolBarModule,
|
|
288
|
-
TextBoxModule
|
|
291
|
+
TextBoxModule,
|
|
292
|
+
TextAreaModule,
|
|
293
|
+
LabelModule], exports: [EditorComponent,
|
|
289
294
|
//alignment
|
|
290
295
|
EditorAlignLeftButtonDirective,
|
|
291
296
|
EditorAlignCenterButtonDirective,
|
|
@@ -364,8 +369,11 @@ EditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
|
364
369
|
DropDownsModule,
|
|
365
370
|
NumericTextBoxModule,
|
|
366
371
|
CheckBoxModule,
|
|
372
|
+
IconsModule,
|
|
367
373
|
ToolBarModule,
|
|
368
|
-
TextBoxModule
|
|
374
|
+
TextBoxModule,
|
|
375
|
+
TextAreaModule,
|
|
376
|
+
LabelModule
|
|
369
377
|
], ToolBarModule,
|
|
370
378
|
ButtonModule,
|
|
371
379
|
FormsModule,
|
|
@@ -405,8 +413,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
405
413
|
DropDownsModule,
|
|
406
414
|
NumericTextBoxModule,
|
|
407
415
|
CheckBoxModule,
|
|
416
|
+
IconsModule,
|
|
408
417
|
ToolBarModule,
|
|
409
|
-
TextBoxModule
|
|
418
|
+
TextBoxModule,
|
|
419
|
+
TextAreaModule,
|
|
420
|
+
LabelModule
|
|
410
421
|
]
|
|
411
422
|
}]
|
|
412
423
|
}] });
|
|
@@ -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:
|
|
13
|
-
version: '',
|
|
12
|
+
publishDate: 1674032463,
|
|
13
|
+
version: '11.0.0',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Directive } from '@angular/core';
|
|
6
6
|
import { EditorColorPickerComponent } from './editor-colorpicker.component';
|
|
7
|
-
import { commandIcons } from '../../config/command-icons';
|
|
7
|
+
import { commandIcons, commandSVGIcons } from '../../config/command-icons';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "./editor-colorpicker.component";
|
|
10
10
|
/**
|
|
@@ -16,6 +16,7 @@ export class EditorBackColorDirective {
|
|
|
16
16
|
constructor(colorPicker) {
|
|
17
17
|
this.colorPicker = colorPicker;
|
|
18
18
|
this.colorPicker.icon = commandIcons.backColor;
|
|
19
|
+
this.colorPicker.svgIcon = commandSVGIcons.backColor;
|
|
19
20
|
this.colorPicker.editorCommand = 'backColor';
|
|
20
21
|
}
|
|
21
22
|
}
|