@progress/kendo-angular-editor 4.0.0-next.202203291212 → 4.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.
Files changed (29) hide show
  1. package/bundles/kendo-angular-editor.umd.js +1 -1
  2. package/common/styles.d.ts +1 -1
  3. package/editor.component.d.ts +1 -0
  4. package/esm2015/common/styles.js +76 -50
  5. package/esm2015/dialogs/colorpicker-dialog.component.js +1 -1
  6. package/esm2015/dialogs/file-link-dialog.component.js +1 -1
  7. package/esm2015/dialogs/font-family-dialog.component.js +1 -1
  8. package/esm2015/dialogs/font-size-dialog.component.js +1 -1
  9. package/esm2015/dialogs/format-dialog.component.js +1 -1
  10. package/esm2015/dialogs/image-dialog.component.js +1 -1
  11. package/esm2015/dialogs/insert-table-dialog.component.js +1 -1
  12. package/esm2015/dialogs/source-dialog.component.js +1 -1
  13. package/esm2015/editor.component.js +17 -8
  14. package/esm2015/main.js +2 -1
  15. package/esm2015/package-metadata.js +1 -1
  16. package/esm2015/tools/colorpicker/editor-colorpicker.component.js +1 -1
  17. package/esm2015/tools/fontfamily/editor-fontfamily-dropdownlist.component.js +1 -1
  18. package/esm2015/tools/fontfamily/editor-fontfamily.component.js +1 -1
  19. package/esm2015/tools/fontsize/editor-fontsize-dropdownlist.component.js +1 -1
  20. package/esm2015/tools/fontsize/editor-fontsize.component.js +1 -1
  21. package/esm2015/tools/format/editor-format-dropdownlist.component.js +1 -1
  22. package/esm2015/tools/format/editor-format.component.js +1 -1
  23. package/esm2015/tools/tables/editor-insert-table-button.component.js +1 -1
  24. package/esm2015/util.js +8 -0
  25. package/fesm2015/kendo-angular-editor.js +117 -75
  26. package/main.d.ts +2 -1
  27. package/package.json +18 -20
  28. package/schematics/ngAdd/index.js +2 -2
  29. package/util.d.ts +7 -0
@@ -9,7 +9,7 @@ export declare const defaultStyle = "\n html, body {\n margin: 0;\n
9
9
  /**
10
10
  * @hidden
11
11
  */
12
- export declare const tablesStyles = "\n.ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n}\n\n.ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n}\n\n.ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n}\n\n.ProseMirror th {\n font-weight: bold;\n text-align: left;\n}\n\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n\n/* Give selected cells a blue overlay */\n.ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: \"\";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n}\n";
12
+ export declare const tablesStyles = "\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n\n .ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n }\n\n .ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n }\n\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: \"\";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n\n /* Resizing */\n .k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n }\n\n .ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n }\n \n .ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n }\n\n .k-editor-resize-wrap-element table td p,\n .k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n }\n";
13
13
  /**
14
14
  * @hidden
15
15
  */
@@ -297,6 +297,7 @@ export declare class EditorComponent implements AfterViewInit, ControlValueAcces
297
297
  private normalizeProperties;
298
298
  private onTouchedCallback;
299
299
  private onPaste;
300
+ private dispatchPasteEvent;
300
301
  static ɵfac: i0.ɵɵFactoryDeclaration<EditorComponent, never>;
301
302
  static ɵcmp: i0.ɵɵComponentDeclaration<EditorComponent, "kendo-editor", never, { "value": "value"; "disabled": "disabled"; "readonly": "readonly"; "iframe": "iframe"; "applyToWord": "applyToWord"; "schema": "schema"; "plugins": "plugins"; "placeholder": "placeholder"; "preserveWhitespace": "preserveWhitespace"; "pasteCleanupSettings": "pasteCleanupSettings"; "resizable": "resizable"; }, { "valueChange": "valueChange"; "onFocus": "focus"; "paste": "paste"; "onBlur": "blur"; }, ["userToolBarComponent", "userToolBarElement"], ["kendo-toolbar"]>;
302
303
  }
@@ -200,56 +200,82 @@ export const defaultStyle = `
200
200
  * @hidden
201
201
  */
202
202
  export const tablesStyles = `
203
- .ProseMirror .tableWrapper {
204
- overflow-x: auto;
205
- margin: 1em 0;
206
- }
207
-
208
- .ProseMirror table {
209
- margin: 0;
210
- border-collapse: collapse;
211
- table-layout: fixed;
212
- width: 100%;
213
- overflow: hidden;
214
- }
215
-
216
- .ProseMirror td, .ProseMirror th {
217
- min-width: 1em;
218
- border: 1px solid #ddd;
219
- padding: 3px 5px;
220
- vertical-align: top;
221
- box-sizing: border-box;
222
- position: relative;
223
- }
224
-
225
- .ProseMirror th {
226
- font-weight: bold;
227
- text-align: left;
228
- }
229
-
230
- .ProseMirror .column-resize-handle {
231
- position: absolute;
232
- right: -2px; top: 0; bottom: 0;
233
- width: 4px;
234
- z-index: 20;
235
- background-color: #adf;
236
- pointer-events: none;
237
- }
238
-
239
- .ProseMirror.resize-cursor {
240
- cursor: ew-resize;
241
- cursor: col-resize;
242
- }
243
-
244
- /* Give selected cells a blue overlay */
245
- .ProseMirror .selectedCell:after {
246
- z-index: 2;
247
- position: absolute;
248
- content: "";
249
- left: 0; right: 0; top: 0; bottom: 0;
250
- background: rgba(200, 200, 255, 0.4);
251
- pointer-events: none;
252
- }
203
+ .ProseMirror .tableWrapper {
204
+ overflow-x: auto;
205
+ margin: 1em 0;
206
+ }
207
+
208
+ .ProseMirror table {
209
+ margin: 0;
210
+ border-collapse: collapse;
211
+ table-layout: fixed;
212
+ width: 100%;
213
+ overflow: hidden;
214
+ }
215
+
216
+ .ProseMirror td, .ProseMirror th {
217
+ min-width: 1em;
218
+ border: 1px solid #ddd;
219
+ padding: 3px 5px;
220
+ vertical-align: top;
221
+ box-sizing: border-box;
222
+ position: relative;
223
+ }
224
+
225
+ .ProseMirror th {
226
+ font-weight: bold;
227
+ text-align: left;
228
+ }
229
+
230
+ .ProseMirror .column-resize-handle {
231
+ position: absolute;
232
+ right: -2px; top: 0; bottom: 0;
233
+ width: 4px;
234
+ z-index: 20;
235
+ background-color: #adf;
236
+ pointer-events: none;
237
+ }
238
+
239
+ .ProseMirror.resize-cursor {
240
+ cursor: ew-resize;
241
+ cursor: col-resize;
242
+ }
243
+
244
+ /* Give selected cells a blue overlay */
245
+ .ProseMirror .selectedCell:after {
246
+ z-index: 2;
247
+ position: absolute;
248
+ content: "";
249
+ left: 0; right: 0; top: 0; bottom: 0;
250
+ background: rgba(200, 200, 255, 0.4);
251
+ pointer-events: none;
252
+ }
253
+
254
+ /* Resizing */
255
+ .k-editor-resize-wrap-element {
256
+ display: inline-block;
257
+ position: relative;
258
+ }
259
+
260
+ .ProseMirror .row-resize-handle {
261
+ position: absolute;
262
+ right: 0; left: 0; bottom: 0;
263
+ transform: translate(0, 50%);
264
+ height: 4px;
265
+ z-index: 20;
266
+ background-color: #adf;
267
+ pointer-events: none;
268
+ }
269
+
270
+ .ProseMirror.resize-cursor-vertical {
271
+ cursor: sn-resize;
272
+ cursor: row-resize;
273
+ }
274
+
275
+ .k-editor-resize-wrap-element table td p,
276
+ .k-editor-resize-wrap-element table th p {
277
+ margin: 0 auto;
278
+ }
253
279
  `;
254
280
  /**
255
281
  * @hidden
@@ -77,7 +77,7 @@ ColorPickerDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
77
77
  <button kendoButton
78
78
  (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogApply') }}</button>
79
79
  </kendo-dialog-actions>
80
- `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
80
+ `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
81
81
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColorPickerDialogComponent, decorators: [{
82
82
  type: Component,
83
83
  args: [{
@@ -148,7 +148,7 @@ FileLinkDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
148
148
  {{ textFor('dialogInsert') }}
149
149
  </button>
150
150
  </kendo-dialog-actions>
151
- `, 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"] }], directives: [{ type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
151
+ `, 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"] }], directives: [{ type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
152
152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FileLinkDialogComponent, decorators: [{
153
153
  type: Component,
154
154
  args: [{
@@ -69,7 +69,7 @@ FontFamilyDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
69
69
  <button kendoButton
70
70
  (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogApply') }}</button>
71
71
  </kendo-dialog-actions>
72
- `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.FontFamilyDropDownListComponent, selector: "kendo-editor-fontfamily-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
72
+ `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.FontFamilyDropDownListComponent, selector: "kendo-editor-fontfamily-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
73
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontFamilyDialogComponent, decorators: [{
74
74
  type: Component,
75
75
  args: [{
@@ -69,7 +69,7 @@ FontSizeDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
69
69
  <button kendoButton
70
70
  (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogApply') }}</button>
71
71
  </kendo-dialog-actions>
72
- `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.FontSizeDropDownListComponent, selector: "kendo-editor-fontsize-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
72
+ `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.FontSizeDropDownListComponent, selector: "kendo-editor-fontsize-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
73
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontSizeDialogComponent, decorators: [{
74
74
  type: Component,
75
75
  args: [{
@@ -69,7 +69,7 @@ FormatDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
69
69
  <button kendoButton
70
70
  (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogApply') }}</button>
71
71
  </kendo-dialog-actions>
72
- `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.FormatDropDownListComponent, selector: "kendo-editor-format-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
72
+ `, isInline: true, components: [{ type: i1.DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { type: i3.FormatDropDownListComponent, selector: "kendo-editor-format-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }, { type: i1.DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
73
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormatDialogComponent, decorators: [{
74
74
  type: Component,
75
75
  args: [{
@@ -123,7 +123,7 @@ ImageDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
123
123
  <button kendoButton [disabled]="imageData.invalid"
124
124
  (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogInsert') }}</button>
125
125
  </kendo-dialog-actions>
126
- `, 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"] }], directives: [{ type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
126
+ `, 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"] }], directives: [{ type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
127
127
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ImageDialogComponent, decorators: [{
128
128
  type: Component,
129
129
  args: [{
@@ -49,7 +49,7 @@ InsertTableDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
49
49
  <kendo-dialog-actions>
50
50
  <button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
51
51
  </kendo-dialog-actions>
52
- `, 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"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
52
+ `, 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"] }], directives: [{ type: i4.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
53
53
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: InsertTableDialogComponent, decorators: [{
54
54
  type: Component,
55
55
  args: [{
@@ -59,7 +59,7 @@ SourceDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
59
59
  <button kendoButton (click)="onCancelAction()">{{ textFor('dialogCancel') }}</button>
60
60
  <button kendoButton (click)="onConfirmAction()" [primary]="true">{{ textFor('dialogUpdate') }}</button>
61
61
  </kendo-dialog-actions>
62
- `, isInline: true, styles: ["\n >>> .k-editor-textarea {\n height: 100%;\n }\n "], 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"] }], directives: [{ type: i3.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
62
+ `, isInline: true, styles: ["\n >>> .k-editor-textarea {\n height: 100%;\n }\n "], 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"] }], directives: [{ type: i3.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
63
63
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SourceDialogComponent, decorators: [{
64
64
  type: Component,
65
65
  args: [{
@@ -8,7 +8,7 @@ import { BehaviorSubject, fromEvent, Subject, zip } from 'rxjs';
8
8
  import { map, filter, take } from 'rxjs/operators';
9
9
  import { ToolBarComponent } from '@progress/kendo-angular-toolbar';
10
10
  import { hasObservers, isDocumentAvailable, KendoInput } from '@progress/kendo-angular-common';
11
- import { buildKeymap, buildListKeymap, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, AllSelection, gapCursor, getSelectionText, imageResizing, tableEditing, caretColor } from '@progress/kendo-editor-common';
11
+ import { buildKeymap, buildListKeymap, getHtml, pasteCleanup, sanitize, removeComments, sanitizeClassAttr, sanitizeStyleAttr, removeAttribute, placeholder, EditorView, EditorState, baseKeymap, keymap, history, parseContent, Plugin, PluginKey, TextSelection, Schema, AllSelection, gapCursor, getSelectionText, imageResizing, tableEditing, caretColor, tableResizing } from '@progress/kendo-editor-common';
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import { packageMetadata } from './package-metadata';
14
14
  import { schema } from './config/schema';
@@ -159,7 +159,10 @@ export class EditorComponent {
159
159
  this.view.updateState(this.view.state.apply(tr));
160
160
  }
161
161
  };
162
- this.transformPastedHTML = (dirtyHtml) => {
162
+ this.transformPastedHTML = (dirtyHtml, plainText) => {
163
+ if (plainText) {
164
+ return this.dispatchPasteEvent(dirtyHtml, dirtyHtml);
165
+ }
163
166
  const pasteCleanupSettings = Object.assign(Object.assign({}, defaultPasteCleanupSettings), this.pasteCleanupSettings);
164
167
  const html = pipe(removeInvalidHTMLIf(pasteCleanupSettings.removeInvalidHTML), removeCommentsIf(pasteCleanupSettings.removeHtmlComments))(dirtyHtml);
165
168
  const clean = pasteCleanup(html, {
@@ -167,12 +170,7 @@ export class EditorComponent {
167
170
  stripTags: pasteCleanupSettings.stripTags.join('|'),
168
171
  attributes: getPasteCleanupAttributes(pasteCleanupSettings)
169
172
  });
170
- if (hasObservers(this.paste)) {
171
- const event = new EditorPasteEvent(clean, dirtyHtml, this._pasteEvent);
172
- this.ngZone.run(() => this.paste.emit(event));
173
- return event.isDefaultPrevented() ? '' : event.cleanedHtml;
174
- }
175
- return clean;
173
+ return this.dispatchPasteEvent(dirtyHtml, clean);
176
174
  };
177
175
  this.changeValue = (value) => {
178
176
  const prev = this._value;
@@ -661,6 +659,7 @@ export class EditorComponent {
661
659
  keymap(baseKeymap),
662
660
  gapCursor(),
663
661
  imageResizing(),
662
+ ...tableResizing(),
664
663
  tableEditing(),
665
664
  caretColor()
666
665
  ];
@@ -684,6 +683,7 @@ export class EditorComponent {
684
683
  editable: () => !this.readonly,
685
684
  dispatchTransaction: this.dispatchTransaction,
686
685
  transformPastedHTML: this.transformPastedHTML,
686
+ transformPastedText: this.transformPastedHTML,
687
687
  handleDOMEvents: {
688
688
  paste: this.onPaste
689
689
  }
@@ -788,6 +788,15 @@ export class EditorComponent {
788
788
  }
789
789
  });
790
790
  }
791
+ dispatchPasteEvent(originalContent, cleanContent) {
792
+ if (hasObservers(this.paste)) {
793
+ const event = new EditorPasteEvent(cleanContent, originalContent, this._pasteEvent);
794
+ this.ngZone.run(() => this.paste.emit(event));
795
+ return event.isDefaultPrevented() ? '' : event.cleanedHtml;
796
+ }
797
+ return cleanContent;
798
+ }
799
+ ;
791
800
  }
792
801
  EditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", 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 });
793
802
  EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EditorComponent, selector: "kendo-editor", inputs: { value: "value", disabled: "disabled", readonly: "readonly", iframe: "iframe", 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: [
package/esm2015/main.js CHANGED
@@ -5,7 +5,8 @@
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, getSelectionText } 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 } from '@progress/kendo-editor-common';
9
+ export { getSelectionText } from './util';
9
10
  export { EditorPasteEvent } from './preventable-events/paste-event';
10
11
  // addresses build errors due to "error NG3001: Unsupported private class"
11
12
  // https://stackoverflow.com/questions/60121962/this-class-is-visible-to-consumers-via-somemodule-somecomponent-but-is-not-e/60122077#60122077
@@ -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: 1648555336,
12
+ publishDate: 1650441316,
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
  };
@@ -187,7 +187,7 @@ EditorColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
187
187
  {{ title }}
188
188
  </button>
189
189
  </ng-template>
190
- `, isInline: true, components: [{ type: i4.ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }], directives: [{ type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
190
+ `, isInline: true, components: [{ type: i4.ColorPickerComponent, selector: "kendo-colorpicker", inputs: ["views", "view", "activeView", "readonly", "disabled", "format", "value", "popupSettings", "paletteSettings", "gradientSettings", "icon", "iconClass", "clearButton", "tabindex", "preview", "actionsLayout", "size", "rounded", "fillMode"], outputs: ["valueChange", "open", "close", "focus", "blur", "cancel", "activeColorClick", "activeViewChange"], exportAs: ["kendoColorPicker"] }], directives: [{ type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
191
191
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorColorPickerComponent, decorators: [{
192
192
  type: Component,
193
193
  args: [{
@@ -45,7 +45,7 @@ FontFamilyDropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
45
45
  </span>
46
46
  </ng-template>
47
47
  </kendo-dropdownlist>
48
- `, isInline: true, styles: ["\n .k-dropdownlist {\n width: 13em;\n }\n "], components: [{ type: i1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["listHeight", "disabled", "readonly", "filterable", "ignoreCase", "delay", "tabindex", "id", "data", "value", "popupSettings", "itemDisabled", "virtual", "valuePrimitive", "tabIndex", "size", "rounded", "fillMode", "iconClass", "loading", "textField", "valueField", "defaultItem"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i2.DropDownToolDirective, selector: "[kendoEditorDropDownTool]" }, { type: i1.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
48
+ `, isInline: true, styles: ["\n .k-dropdownlist {\n width: 13em;\n }\n "], components: [{ type: i1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i2.DropDownToolDirective, selector: "[kendoEditorDropDownTool]" }, { type: i1.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
49
49
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontFamilyDropDownListComponent, decorators: [{
50
50
  type: Component,
51
51
  args: [{
@@ -179,7 +179,7 @@ EditorFontFamilyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
179
179
  {{ title }}
180
180
  </button>
181
181
  </ng-template>
182
- `, isInline: true, components: [{ type: i5.FontFamilyDropDownListComponent, selector: "kendo-editor-fontfamily-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
182
+ `, isInline: true, components: [{ type: i5.FontFamilyDropDownListComponent, selector: "kendo-editor-fontfamily-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
183
183
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorFontFamilyComponent, decorators: [{
184
184
  type: Component,
185
185
  args: [{
@@ -39,7 +39,7 @@ FontSizeDropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
39
39
  (valueChange)="onValueChange($event)"
40
40
  >
41
41
  </kendo-dropdownlist>
42
- `, isInline: true, styles: ["\n .k-dropdownlist {\n width: 13em;\n }\n "], components: [{ type: i1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["listHeight", "disabled", "readonly", "filterable", "ignoreCase", "delay", "tabindex", "id", "data", "value", "popupSettings", "itemDisabled", "virtual", "valuePrimitive", "tabIndex", "size", "rounded", "fillMode", "iconClass", "loading", "textField", "valueField", "defaultItem"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i2.DropDownToolDirective, selector: "[kendoEditorDropDownTool]" }] });
42
+ `, isInline: true, styles: ["\n .k-dropdownlist {\n width: 13em;\n }\n "], components: [{ type: i1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i2.DropDownToolDirective, selector: "[kendoEditorDropDownTool]" }] });
43
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontSizeDropDownListComponent, decorators: [{
44
44
  type: Component,
45
45
  args: [{
@@ -176,7 +176,7 @@ EditorFontSizeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
176
176
  {{ title }}
177
177
  </button>
178
178
  </ng-template>
179
- `, isInline: true, components: [{ type: i5.FontSizeDropDownListComponent, selector: "kendo-editor-fontsize-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
179
+ `, isInline: true, components: [{ type: i5.FontSizeDropDownListComponent, selector: "kendo-editor-fontsize-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
180
180
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorFontSizeComponent, decorators: [{
181
181
  type: Component,
182
182
  args: [{
@@ -73,7 +73,7 @@ FormatDropDownListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
73
73
  </ng-container>
74
74
  </ng-template>
75
75
  </kendo-dropdownlist>
76
- `, isInline: true, styles: ["\n .k-dropdownlist {\n width: 13em;\n }\n "], components: [{ type: i1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["listHeight", "disabled", "readonly", "filterable", "ignoreCase", "delay", "tabindex", "id", "data", "value", "popupSettings", "itemDisabled", "virtual", "valuePrimitive", "tabIndex", "size", "rounded", "fillMode", "iconClass", "loading", "textField", "valueField", "defaultItem"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i2.DropDownToolDirective, selector: "[kendoEditorDropDownTool]" }, { type: i1.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
76
+ `, isInline: true, styles: ["\n .k-dropdownlist {\n width: 13em;\n }\n "], components: [{ type: i1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }], directives: [{ type: i2.DropDownToolDirective, selector: "[kendoEditorDropDownTool]" }, { type: i1.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
77
77
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormatDropDownListComponent, decorators: [{
78
78
  type: Component,
79
79
  args: [{
@@ -175,7 +175,7 @@ EditorFormatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
175
175
  {{ title }}
176
176
  </button>
177
177
  </ng-template>
178
- `, isInline: true, components: [{ type: i5.FormatDropDownListComponent, selector: "kendo-editor-format-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
178
+ `, isInline: true, components: [{ type: i5.FormatDropDownListComponent, selector: "kendo-editor-format-dropdownlist", inputs: ["data", "value", "defaultItem", "itemDisabled", "title", "disabled", "tabindex"], outputs: ["valueChange"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
179
179
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorFormatComponent, decorators: [{
180
180
  type: Component,
181
181
  args: [{
@@ -184,7 +184,7 @@ EditorInsertTableButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
184
184
  <ng-template #popupGridTemplate>
185
185
  <kendo-popup-table-grid (cellClick)="onCellClick($event)" (tableWizardClick)="onTableWizardClick()"></kendo-popup-table-grid>
186
186
  </ng-template>
187
- `, isInline: true, components: [{ type: i5.PopupTableGridComponent, selector: "kendo-popup-table-grid", outputs: ["cellClick", "tableWizardClick"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "shape", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
187
+ `, isInline: true, components: [{ type: i5.PopupTableGridComponent, selector: "kendo-popup-table-grid", outputs: ["cellClick", "tableWizardClick"] }], directives: [{ type: i6.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
188
188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorInsertTableButtonComponent, decorators: [{
189
189
  type: Component,
190
190
  args: [{
package/esm2015/util.js CHANGED
@@ -3,6 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
6
+ import { getSelectionText as commonGetSelectionText } from '@progress/kendo-editor-common';
6
7
  /**
7
8
  * @hidden
8
9
  */
@@ -114,3 +115,10 @@ export const conditionallyExecute = (fn) => (condition) => (param) => (condition
114
115
  * @hidden
115
116
  */
116
117
  export const pipe = (...fns) => x => fns.reduce((y, f) => f(y), x);
118
+ // This re-declaration is neccessary for proper API generation
119
+ /**
120
+ * A method for extracting the text from the current editor state's selection
121
+ * @param state
122
+ * @returns
123
+ */
124
+ export const getSelectionText = (state) => commonGetSelectionText(state);