@progress/kendo-angular-editor 2.5.0 → 3.0.0-dev.202112211443

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.
@@ -5,12 +5,12 @@
5
5
  import { __assign, __extends, __decorate, __param, __metadata } from 'tslib';
6
6
  import { Inject, Optional, Input, ViewChild, ElementRef, Component, Injectable, isDevMode, Output, EventEmitter, HostBinding, ContentChild, ViewContainerRef, forwardRef, ChangeDetectorRef, NgZone, TemplateRef, Host, Directive, NgModule } from '@angular/core';
7
7
  import { FormControl, Validators, FormGroup, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import { Subject, fromEvent, merge, BehaviorSubject, zip, interval } from 'rxjs';
9
- import { take, filter, auditTime, map, concatMap, takeUntil } from 'rxjs/operators';
8
+ import { Subject, fromEvent, BehaviorSubject, zip, interval } from 'rxjs';
9
+ import { take, map, filter, concatMap, takeUntil } from 'rxjs/operators';
10
10
  import { ToolBarComponent, ToolBarToolComponent, ToolBarButtonComponent, ToolBarModule } from '@progress/kendo-angular-toolbar';
11
11
  import { DialogRef, DialogContentBase, DialogService, DialogModule } from '@progress/kendo-angular-dialog';
12
- import { isDocumentAvailable, guid, KendoInput, Keys } from '@progress/kendo-angular-common';
13
- import { nodes, Schema, marks, SelectionRange, TextSelection, Fragment, Slice, Selection, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, selectAll, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, imageResizing, placeholder, EditorState, EditorView, hasSameMarkup, pasteCleanup, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
12
+ import { isDocumentAvailable, guid, PreventableEvent, KendoInput, hasObservers, Keys } from '@progress/kendo-angular-common';
13
+ import { nodes, Schema, marks, SelectionRange, TextSelection, Fragment, Slice, Selection, NodeSelection, insertNode, expandToWordWrap, toggleInlineFormat, bold, cleanFormatting, applyLink, applyInlineStyle, insertText, italic, strikethrough, subscript, superscript, underline, removeLink, link, selectAll, isAligned, alignCenterRules, alignBlocks, alignRemoveRules, alignJustifyRules, alignLeftRules, alignRightRules, formatBlockElements, getHtml, indent, insertImage, toggleOrderedList, toggleUnorderedList, outdent, redo, setHtml, undo, hasMark, activeNode, canIndentAsListItem, canBeIndented, indentRules, hasNode, canOutdentAsListItem, outdentRules, getActiveMarks, expandSelection, addColumnBefore, addColumnAfter, addRowBefore, addRowAfter, deleteRow, deleteColumn, mergeCells, splitCell, deleteTable, getNodeFromSelection, getMark, getSelectionText, parseContent, Plugin, PluginKey, history, keymap, buildListKeymap, buildKeymap, baseKeymap, gapCursor, imageResizing, placeholder, EditorState, EditorView, pasteCleanup, AllSelection, removeComments, sanitize, removeAttribute, sanitizeStyleAttr, sanitizeClassAttr } from '@progress/kendo-editor-common';
14
14
  export { Schema, 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';
15
15
  import { validatePackage } from '@progress/kendo-licensing';
16
16
  import { L10N_PREFIX, RTL, MessageService, LocalizationService, ComponentMessages } from '@progress/kendo-angular-l10n';
@@ -27,7 +27,7 @@ var packageMetadata = {
27
27
  name: '@progress/kendo-angular-editor',
28
28
  productName: 'Kendo UI for Angular',
29
29
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
30
- publishDate: 1638198421,
30
+ publishDate: 1640097479,
31
31
  version: '',
32
32
  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'
33
33
  };
@@ -2273,7 +2273,7 @@ var tablesStyles = "\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n
2273
2273
  */
2274
2274
  var rtlStyles = 'body { direction: rtl }';
2275
2275
 
2276
- var ɵ0$6 = function (arg) { return "plugins must be a function, but received " + JSON.stringify(arg) + "."; };
2276
+ var ɵ0$6 = function (arg) { return "plugins must be a function, but received " + JSON.stringify(arg) + "."; }, ɵ1$6 = function (arg) { return "pastedContent must be a function, but received " + JSON.stringify(arg) + "."; };
2277
2277
  /* tslint:disable:variable-name */
2278
2278
  /**
2279
2279
  * @hidden
@@ -2282,6 +2282,7 @@ var EditorErrorMessages = {
2282
2282
  schemaType: 'Expected value of type Schema. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
2283
2283
  setSchemaOnce: 'The Schema cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
2284
2284
  pluginsCallbackType: ɵ0$6,
2285
+ pastedContentCallbackType: ɵ1$6,
2285
2286
  setPluginsOnce: 'The plugins cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/plugins/',
2286
2287
  setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/',
2287
2288
  printTool: 'The Print tool and functionality are supported only in iframe mode. See https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorPrintButtonDirective/'
@@ -2300,15 +2301,34 @@ var EditorToolsService = /** @class */ (function () {
2300
2301
  return EditorToolsService;
2301
2302
  }());
2302
2303
 
2304
+ /**
2305
+ * The Editor [`paste`]({% slug api_editor_editorcomponent %}#toc-paste) event.
2306
+ */
2307
+ var EditorPasteEvent = /** @class */ (function (_super) {
2308
+ __extends(EditorPasteEvent, _super);
2309
+ /**
2310
+ * Constructs the event arguments for the `paste` event.
2311
+ * @hidden
2312
+ */
2313
+ function EditorPasteEvent(cleanedHtml, originalHtml, originalEvent) {
2314
+ var _this = _super.call(this) || this;
2315
+ _this.cleanedHtml = cleanedHtml;
2316
+ _this.originalHtml = originalHtml;
2317
+ _this.originalEvent = originalEvent;
2318
+ return _this;
2319
+ }
2320
+ return EditorPasteEvent;
2321
+ }(PreventableEvent));
2322
+
2303
2323
  var EMPTY_PARAGRAPH = '<p></p>';
2304
2324
  var defaultPasteCleanupSettings = {
2305
2325
  convertMsLists: false,
2306
2326
  removeAttributes: [],
2307
2327
  removeHtmlComments: false,
2308
- removeInvalidHTML: false,
2328
+ removeInvalidHTML: true,
2309
2329
  removeMsClasses: false,
2310
2330
  removeMsStyles: false,
2311
- stripTags: ['']
2331
+ stripTags: []
2312
2332
  };
2313
2333
  var removeCommentsIf = conditionallyExecute(removeComments);
2314
2334
  var removeInvalidHTMLIf = conditionallyExecute(sanitize);
@@ -2348,14 +2368,6 @@ var EditorComponent = /** @class */ (function () {
2348
2368
  * @default false
2349
2369
  */
2350
2370
  this.applyToWord = false;
2351
- /**
2352
- * By design, the Editor emits `valueChange`, updates the model and the ToolBar state on each keystroke.
2353
- * When you are interested in ignoring the new values for a given amout of time and take only the most recent one, you can use the `updateInterval` property.
2354
- * A possible use case is to get the new values and to update the ToolBar state at a maximum rate per second in order to speed up your application.
2355
- * The specified interval (in milliseconds) should be a positive number.
2356
- * By default the `updateInterval` is set to 100 miliseconds. If set to zero the delay will be disabled entirely.
2357
- */
2358
- this.updateInterval = 100;
2359
2371
  /**
2360
2372
  * By default, whitespace is collapsed as per HTML's rules.
2361
2373
  * Set to `true` to preserve whitespace, but normalize newlines to spaces.
@@ -2381,6 +2393,11 @@ var EditorComponent = /** @class */ (function () {
2381
2393
  * Fires when the content area of the Editor is focused ([see example]({% slug overview_editor %}#toc-events)).
2382
2394
  */
2383
2395
  this.onFocus = new EventEmitter();
2396
+ /**
2397
+ * Fires when the user performs paste in the content area of the Editor ([see example]({% slug overview_editor %}#toc-events)).
2398
+ * The event is preventable. If you cancel it, the Editor content will not change.
2399
+ */
2400
+ this.paste = new EventEmitter();
2384
2401
  /**
2385
2402
  * Fires when the content area of the Editor is blurred ([see example]({% slug overview_editor %}#toc-events)).
2386
2403
  */
@@ -2396,10 +2413,73 @@ var EditorComponent = /** @class */ (function () {
2396
2413
  this.valueModified = new Subject();
2397
2414
  this._readonly = false;
2398
2415
  this._placeholder = '';
2416
+ this.inForm = false;
2399
2417
  this.afterViewInit = new Subject();
2400
2418
  this.contentAreaLoaded = new Subject();
2401
- this.onChangeCallback = function (_) { }; // tslint:disable-line:no-empty
2419
+ this.dispatchTransaction = function (tr) {
2420
+ var docChanged = tr.docChanged;
2421
+ if (docChanged) {
2422
+ var doc = tr.doc;
2423
+ var html_1 = getHtml({ doc: doc });
2424
+ _this.trOnChange = tr;
2425
+ _this.htmlOnChange = html_1;
2426
+ _this.ngZone.run(function () {
2427
+ _this.valueModified.next(html_1);
2428
+ });
2429
+ }
2430
+ if (!docChanged || _this.inForm) {
2431
+ _this.view.updateState(_this.view.state.apply(tr));
2432
+ }
2433
+ };
2434
+ this.transformPastedHTML = function (dirtyHtml) {
2435
+ var pasteCleanupSettings = __assign({}, defaultPasteCleanupSettings, _this.pasteCleanupSettings);
2436
+ var html = pipe(removeInvalidHTMLIf(pasteCleanupSettings.removeInvalidHTML), removeCommentsIf(pasteCleanupSettings.removeHtmlComments))(dirtyHtml);
2437
+ var clean = pasteCleanup(html, {
2438
+ convertMsLists: pasteCleanupSettings.convertMsLists,
2439
+ stripTags: pasteCleanupSettings.stripTags.join('|'),
2440
+ attributes: getPasteCleanupAttributes(pasteCleanupSettings)
2441
+ });
2442
+ if (hasObservers(_this.paste)) {
2443
+ var event_1 = new EditorPasteEvent(clean, dirtyHtml, _this._pasteEvent);
2444
+ _this.ngZone.run(function () { return _this.paste.emit(event_1); });
2445
+ return event_1.isDefaultPrevented() ? '' : event_1.cleanedHtml;
2446
+ }
2447
+ return clean;
2448
+ };
2449
+ this.changeValue = function (value) {
2450
+ var prev = _this._value;
2451
+ _this._value = value;
2452
+ if (!_this._view) {
2453
+ return;
2454
+ }
2455
+ if (_this.htmlOnChange === value && _this.trOnChange) {
2456
+ _this.view.updateState(_this.view.state.apply(_this.trOnChange));
2457
+ }
2458
+ else {
2459
+ if ((prev || '') !== (value || '')) {
2460
+ var iframeContentWindowNotPresent = _this.iframe && !_this.container.element.nativeElement.contentWindow;
2461
+ if (iframeContentWindowNotPresent) {
2462
+ return;
2463
+ }
2464
+ var state = _this.view.state;
2465
+ var nextDoc = parseContent(value || '', state.schema, { preserveWhitespace: _this.preserveWhitespace });
2466
+ var tr = state.tr
2467
+ .setSelection(new AllSelection(state.doc))
2468
+ .replaceSelectionWith(nextDoc);
2469
+ _this.view.updateState(state.apply(tr));
2470
+ }
2471
+ }
2472
+ _this.trOnChange = null;
2473
+ _this.htmlOnChange = null;
2474
+ };
2475
+ this.onChangeCallback = function (value) {
2476
+ _this.changeValue(value);
2477
+ };
2402
2478
  this.onTouchedCallback = function (_) { }; // tslint:disable-line:no-empty
2479
+ this.onPaste = function (_view, nativeEvent) {
2480
+ _this._pasteEvent = nativeEvent;
2481
+ return false;
2482
+ };
2403
2483
  validatePackage(packageMetadata);
2404
2484
  this.direction = localization.rtl ? 'rtl' : 'ltr';
2405
2485
  // https://stackoverflow.com/questions/56572483/chrome-is-synchronously-handling-iframe-loading-whereas-firefox-handles-it-asyn
@@ -2408,6 +2488,9 @@ var EditorComponent = /** @class */ (function () {
2408
2488
  EditorComponent_1 = EditorComponent;
2409
2489
  Object.defineProperty(EditorComponent.prototype, "value", {
2410
2490
  get: function () {
2491
+ if (this.trOnChange) {
2492
+ return this.htmlOnChange;
2493
+ }
2411
2494
  var value = this._view ? this.getSource() : this._value;
2412
2495
  if (value === EMPTY_PARAGRAPH) {
2413
2496
  return this._value ? '' : this._value;
@@ -2420,23 +2503,7 @@ var EditorComponent = /** @class */ (function () {
2420
2503
  * Sets the value of the Editor ([see example]({% slug overview_editor %}#toc-basic-usage)).
2421
2504
  */
2422
2505
  set: function (value) {
2423
- if (this._previousValue === value) {
2424
- return;
2425
- }
2426
- this._value = value;
2427
- this._previousValue = value;
2428
- if (this._view) {
2429
- var iframeContentWindowNotPresent = this.iframe && !this.container.element.nativeElement.contentWindow;
2430
- if (iframeContentWindowNotPresent) {
2431
- return;
2432
- }
2433
- this.exec('setHTML', {
2434
- content: this._value || '',
2435
- parseOptions: {
2436
- preserveWhitespace: this.preserveWhitespace
2437
- }
2438
- });
2439
- }
2506
+ this.changeValue(value);
2440
2507
  },
2441
2508
  enumerable: true,
2442
2509
  configurable: true
@@ -2697,6 +2764,9 @@ var EditorComponent = /** @class */ (function () {
2697
2764
  };
2698
2765
  EditorComponent.prototype.ngOnChanges = function (changes) {
2699
2766
  var _this = this;
2767
+ if (changes.value && this.view) {
2768
+ this.changeValue(changes.value.currentValue);
2769
+ }
2700
2770
  if (changes.iframe && !changes.iframe.isFirstChange()) {
2701
2771
  this.ngZone.onStable.pipe(take(1)).subscribe(function () { return _this.initialize(); });
2702
2772
  }
@@ -2782,8 +2852,6 @@ var EditorComponent = /** @class */ (function () {
2782
2852
  var command = editorCommands[commandName](attr);
2783
2853
  // Executes a ProseMirror command.
2784
2854
  command(this._view.state, this._view.dispatch, this._view);
2785
- // See the `dispatchTransaction` comments.
2786
- // this.stateChange.emit(updateToolBar(this.view));
2787
2855
  };
2788
2856
  /**
2789
2857
  * Opens a dialog.
@@ -2868,6 +2936,7 @@ var EditorComponent = /** @class */ (function () {
2868
2936
  * @hidden
2869
2937
  */
2870
2938
  EditorComponent.prototype.writeValue = function (value) {
2939
+ this.inForm = true;
2871
2940
  // To avoid confusion, non-existent values are always undefined.
2872
2941
  this.value = value === null ? undefined : value;
2873
2942
  };
@@ -2896,7 +2965,6 @@ var EditorComponent = /** @class */ (function () {
2896
2965
  return;
2897
2966
  }
2898
2967
  var currentSchema = this.schema || schema;
2899
- var that = this;
2900
2968
  var containerNativeElement = this.container.element.nativeElement;
2901
2969
  var contentNode = parseContent((this.value || '').trim(), currentSchema, { preserveWhitespace: this.preserveWhitespace });
2902
2970
  if (this.iframe) {
@@ -2940,7 +3008,7 @@ var EditorComponent = /** @class */ (function () {
2940
3008
  }),
2941
3009
  new Plugin({
2942
3010
  key: new PluginKey('editor-filter-disabled-state'),
2943
- filterTransaction: function () { return !_this.disabled; }
3011
+ filterTransaction: function () { return !_this.disabled || _this.inForm; }
2944
3012
  }),
2945
3013
  history(),
2946
3014
  keymap(buildListKeymap(currentSchema)),
@@ -2967,31 +3035,10 @@ var EditorComponent = /** @class */ (function () {
2967
3035
  _this._view = new EditorView({ mount: _this.viewMountElement }, {
2968
3036
  state: state,
2969
3037
  editable: function () { return !_this.readonly; },
2970
- dispatchTransaction: function (tr) {
2971
- // `this` is bound to the view instance.
2972
- this.updateState(this.state.apply(tr));
2973
- // that.cdr.detectChanges();
2974
- // When the user utilizes keyboard shortcuts&mdash;for example, `Ctrl`+`b`&mdash;
2975
- // `tr.docChanged` is `true` and the toolbar is not updated.
2976
- // A possible future solution is to move the keymaps to the service.
2977
- // if (!tr.docChanged) {
2978
- // that.stateChange.emit(updateToolBar(that.view));
2979
- // }
2980
- var value = that.value;
2981
- if (!hasSameMarkup(value, that._previousValue, this.state.schema)) {
2982
- that._previousValue = value;
2983
- that.ngZone.run(function () { return that.valueModified.next(value); });
2984
- }
2985
- },
2986
- transformPastedHTML: function (html) {
2987
- var pasteCleanupSettings = __assign({}, defaultPasteCleanupSettings, _this.pasteCleanupSettings);
2988
- var clean = pipe(removeCommentsIf(pasteCleanupSettings.removeHtmlComments), removeInvalidHTMLIf(pasteCleanupSettings.removeInvalidHTML))(html);
2989
- var attributes = getPasteCleanupAttributes(pasteCleanupSettings);
2990
- return pasteCleanup(clean, {
2991
- convertMsLists: pasteCleanupSettings.convertMsLists,
2992
- stripTags: pasteCleanupSettings.stripTags.join('|'),
2993
- attributes: attributes
2994
- });
3038
+ dispatchTransaction: _this.dispatchTransaction,
3039
+ transformPastedHTML: _this.transformPastedHTML,
3040
+ handleDOMEvents: {
3041
+ paste: _this.onPaste
2995
3042
  }
2996
3043
  });
2997
3044
  });
@@ -3032,7 +3079,7 @@ var EditorComponent = /** @class */ (function () {
3032
3079
  _this.cdr.detectChanges();
3033
3080
  }
3034
3081
  }));
3035
- this.subs.add(merge(this.valueModified.pipe(filter(function () { return _this.updateInterval > 0; }), auditTime(this.updateInterval)), this.valueModified.pipe(filter(function () { return _this.updateInterval === 0; }))).subscribe(function (value) {
3082
+ this.subs.add(this.valueModified.subscribe(function (value) {
3036
3083
  _this.onChangeCallback(value);
3037
3084
  _this.valueChange.emit(value);
3038
3085
  _this.cdr.markForCheck();
@@ -3126,10 +3173,6 @@ var EditorComponent = /** @class */ (function () {
3126
3173
  __metadata("design:type", String),
3127
3174
  __metadata("design:paramtypes", [String])
3128
3175
  ], EditorComponent.prototype, "placeholder", null);
3129
- __decorate([
3130
- Input(),
3131
- __metadata("design:type", Number)
3132
- ], EditorComponent.prototype, "updateInterval", void 0);
3133
3176
  __decorate([
3134
3177
  Input(),
3135
3178
  __metadata("design:type", Object)
@@ -3150,6 +3193,10 @@ var EditorComponent = /** @class */ (function () {
3150
3193
  Output('focus'),
3151
3194
  __metadata("design:type", EventEmitter)
3152
3195
  ], EditorComponent.prototype, "onFocus", void 0);
3196
+ __decorate([
3197
+ Output(),
3198
+ __metadata("design:type", EventEmitter)
3199
+ ], EditorComponent.prototype, "paste", void 0);
3153
3200
  __decorate([
3154
3201
  Output('blur'),
3155
3202
  __metadata("design:type", EventEmitter)
@@ -3257,7 +3304,7 @@ var EditorComponent = /** @class */ (function () {
3257
3304
  }
3258
3305
  ],
3259
3306
  /* tslint:disable:max-line-length */
3260
- template: "\n <ng-container\n kendoEditorLocalizedMessages\n i18n-alignCenter=\"kendo.editor.alignCenter|The title of the tool that aligns text in the center.\"\n alignCenter=\"Center text\"\n i18n-alignJustify=\"kendo.editor.alignJustify|The title of the tool that justifies text both left and right.\"\n alignJustify=\"Justify\"\n i18n-alignLeft=\"kendo.editor.alignLeft|The title of the tool that aligns text on the left.\"\n alignLeft=\"Align text left\"\n i18n-alignRight=\"kendo.editor.alignRight|The title of the tool that aligns text on the right.\"\n alignRight=\"Align text right\"\n i18n-backColor=\"kendo.editor.backColor|The title of the tool that changes the text background color.\"\n backColor=\"Background color\"\n i18n-bold=\"kendo.editor.bold|The title of the tool that makes text bold.\"\n bold=\"Bold\"\n i18n-cleanFormatting=\"kendo.editor.cleanFormatting|The title of the Clean Formatting tool.\"\n cleanFormatting=\"Clean formatting\"\n i18n-createLink=\"kendo.editor.createLink|The title of the tool that creates hyperlinks.\"\n createLink=\"Insert link\"\n i18n-dialogApply=\"kendo.editor.dialogApply|The label of the **Apply** button in all editor dialogs.\"\n dialogApply=\"Apply\"\n i18n-dialogCancel=\"kendo.editor.dialogCancel|The label of the **Cancel** button in all editor dialogs.\"\n dialogCancel=\"Cancel\"\n i18n-dialogInsert=\"kendo.editor.dialogInsert|The label of the **Insert** button in all editor dialogs.\"\n dialogInsert=\"Insert\"\n i18n-dialogUpdate=\"kendo.editor.dialogUpdate|The label of the **Update** button in all editor dialogs.\"\n dialogUpdate=\"Update\"\n i18n-fileText=\"kendo.editor.fileText|The caption for the file text in the insertFile dialog.\"\n fileText=\"Text\"\n i18n-fileTitle=\"kendo.editor.fileTitle|The caption for the file Title in the insertFile dialog.\"\n fileTitle=\"Title\"\n i18n-fileWebAddress=\"kendo.editor.fileWebAddress|The caption for the file URL in the insertFile dialog.\"\n fileWebAddress=\"Web address\"\n i18n-fontFamily=\"kendo.editor.fontFamily|The title of the tool that changes the text font.\"\n fontFamily=\"Select font family\"\n i18n-fontSize=\"kendo.editor.fontSize|The title of the tool that changes the text size.\"\n fontSize=\"Select font size\"\n i18n-foreColor=\"kendo.editor.foreColor|The title of the tool that changes the text color.\"\n foreColor=\"Color\"\n i18n-format=\"kendo.editor.format|The title of the tool that lets users choose block formats.\"\n format=\"Format\"\n i18n-imageAltText=\"kendo.editor.imageAltText|The caption for the image alternate text in the insertImage dialog.\"\n imageAltText=\"Alternate text\"\n i18n-imageHeight=\"kendo.editor.imageHeight|The caption for the image height in the insertImage dialog.\"\n imageHeight=\"Height (px)\"\n i18n-imageWebAddress=\"kendo.editor.imageWebAddress|The caption for the image URL in the insertImage dialog.\"\n imageWebAddress=\"Web address\"\n i18n-imageWidth=\"kendo.editor.imageWidth|The caption for the image width in the insertImage dialog.\"\n imageWidth=\"Width (px)\"\n i18n-indent=\"kendo.editor.indent|The title of the tool that indents the content.\"\n indent=\"Indent\"\n i18n-insertFile=\"kendo.editor.insertFile|The title of the tool that inserts links to files.\"\n insertFile=\"Insert file\"\n i18n-insertImage=\"kendo.editor.insertImage|The title of the tool that inserts images.\"\n insertImage=\"Insert image\"\n i18n-insertOrderedList=\"kendo.editor.insertOrderedList|The title of the tool that inserts an ordered list.\"\n insertOrderedList=\"Insert ordered list\"\n i18n-insertUnorderedList=\"kendo.editor.insertUnorderedList|The title of the tool that inserts an unordered list.\"\n insertUnorderedList=\"Insert unordered list\"\n i18n-italic=\"kendo.editor.italic|The title of the tool that makes text italicized.\"\n italic=\"Italic\"\n i18n-linkOpenInNewWindow=\"kendo.editor.linkOpenInNewWindow|The caption for the checkbox for opening the link in a new window in the createLink dialog.\"\n linkOpenInNewWindow=\"Open link in new window\"\n i18n-linkText=\"kendo.editor.linkText|The caption for the link text in the createLink dialog.\"\n linkText=\"Text\"\n i18n-linkTitle=\"kendo.editor.linkTitle|The caption for the link title in the createLink dialog.\"\n linkTitle=\"Title\"\n i18n-linkWebAddress=\"kendo.editor.linkWebAddress|The caption for the URL in the createLink dialog.\"\n linkWebAddress=\"Web address\"\n i18n-outdent=\"kendo.editor.outdent|The title of the tool that outdents the content.\"\n outdent=\"Outdent\"\n i18n-print=\"kendo.editor.print|The title of the print tool.\"\n print=\"Print\"\n i18n-redo=\"kendo.editor.redo|The title of the tool that undos the last action.\"\n redo=\"Redo\"\n i18n-selectAll=\"kendo.editor.selectAll|The title of the tool that selects all content.\"\n selectAll=\"Select All\"\n i18n-strikethrough=\"kendo.editor.strikethrough|The title of the tool that strikes through text.\"\n strikethrough=\"Strikethrough\"\n i18n-subscript=\"kendo.editor.subscript|The title of the tool that makes text subscript.\"\n subscript=\"Subscript\"\n i18n-superscript=\"kendo.editor.superscript|The title of the tool that makes text superscript.\"\n superscript=\"Superscript\"\n i18n-underline=\"kendo.editor.underline|The title of the tool that underlines text.\"\n underline=\"Underline\"\n i18n-unlink=\"kendo.editor.unlink|The title of the tool that removes hyperlinks.\"\n unlink=\"Remove Link\"\n i18n-undo=\"kendo.editor.undo|The title of the tool that undos the last action.\"\n undo=\"Undo\"\n i18n-viewSource=\"kendo.editor.viewSource|The title of the tool that shows the editor value as HTML.\"\n viewSource=\"View source\"\n i18n-insertTable=\"kendo.editor.insertTable|The title of the tool that inserts table.\"\n insertTable=\"Insert Table\"\n i18n-addColumnBefore=\"kendo.editor.addColumnBefore|The title of the tool that adds new column before currently selected column.\"\n addColumnBefore=\"Add column before\"\n i18n-addColumnAfter=\"kendo.editor.addColumnAfter|The title of the tool that adds new column after currently selected column.\"\n addColumnAfter=\"Add column after\"\n i18n-addRowBefore=\"kendo.editor.addRowBefore|The title of the tool that adds new row before currently selected row.\"\n addRowBefore=\"Add row before\"\n i18n-addRowAfter=\"kendo.editor.addRowAfter|The title of the tool that adds new row after currently selected row.\"\n addRowAfter=\"Add row after\"\n i18n-deleteColumn=\"kendo.editor.deleteColumn|The title of the tool that deletes a table column.\"\n deleteColumn=\"Delete column\"\n i18n-deleteRow=\"kendo.editor.deleteRow|The title of the tool that deletes a table row.\"\n deleteRow=\"Delete row\"\n i18n-deleteTable=\"kendo.editor.deleteTable|The title of the tool that deletes a table.\"\n deleteTable=\"Delete table\"\n >\n </ng-container>\n\n <ng-content select=\"kendo-toolbar\"></ng-content>\n <kendo-toolbar [overflow]=\"true\" [tabindex]=\"readonly ? -1 : 0\" *ngIf=\"!userToolBarElement\" #defaultToolbar>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\n </kendo-toolbar>\n\n <div *ngIf=\"!iframe\" #content [attr.dir]=\"direction\" class=\"k-editor-content\"></div>\n\n <div class=\"k-editor-content\" *ngIf=\"iframe\">\n <iframe #content frameborder=\"0\" class=\"k-iframe\" (load)=\"iframeOnLoad()\"></iframe>\n </div>\n\n <ng-container #dialogsContainer></ng-container>\n ",
3307
+ template: "\n <ng-container\n kendoEditorLocalizedMessages\n i18n-alignCenter=\"kendo.editor.alignCenter|The title of the tool that aligns text in the center.\"\n alignCenter=\"Center text\"\n i18n-alignJustify=\"kendo.editor.alignJustify|The title of the tool that justifies text both left and right.\"\n alignJustify=\"Justify\"\n i18n-alignLeft=\"kendo.editor.alignLeft|The title of the tool that aligns text on the left.\"\n alignLeft=\"Align text left\"\n i18n-alignRight=\"kendo.editor.alignRight|The title of the tool that aligns text on the right.\"\n alignRight=\"Align text right\"\n i18n-backColor=\"kendo.editor.backColor|The title of the tool that changes the text background color.\"\n backColor=\"Background color\"\n i18n-bold=\"kendo.editor.bold|The title of the tool that makes text bold.\"\n bold=\"Bold\"\n i18n-cleanFormatting=\"kendo.editor.cleanFormatting|The title of the Clean Formatting tool.\"\n cleanFormatting=\"Clean formatting\"\n i18n-createLink=\"kendo.editor.createLink|The title of the tool that creates hyperlinks.\"\n createLink=\"Insert link\"\n i18n-dialogApply=\"kendo.editor.dialogApply|The label of the **Apply** button in all editor dialogs.\"\n dialogApply=\"Apply\"\n i18n-dialogCancel=\"kendo.editor.dialogCancel|The label of the **Cancel** button in all editor dialogs.\"\n dialogCancel=\"Cancel\"\n i18n-dialogInsert=\"kendo.editor.dialogInsert|The label of the **Insert** button in all editor dialogs.\"\n dialogInsert=\"Insert\"\n i18n-dialogUpdate=\"kendo.editor.dialogUpdate|The label of the **Update** button in all editor dialogs.\"\n dialogUpdate=\"Update\"\n i18n-fileText=\"kendo.editor.fileText|The caption for the file text in the insertFile dialog.\"\n fileText=\"Text\"\n i18n-fileTitle=\"kendo.editor.fileTitle|The caption for the file Title in the insertFile dialog.\"\n fileTitle=\"Title\"\n i18n-fileWebAddress=\"kendo.editor.fileWebAddress|The caption for the file URL in the insertFile dialog.\"\n fileWebAddress=\"Web address\"\n i18n-fontFamily=\"kendo.editor.fontFamily|The title of the tool that changes the text font.\"\n fontFamily=\"Select font family\"\n i18n-fontSize=\"kendo.editor.fontSize|The title of the tool that changes the text size.\"\n fontSize=\"Select font size\"\n i18n-foreColor=\"kendo.editor.foreColor|The title of the tool that changes the text color.\"\n foreColor=\"Color\"\n i18n-format=\"kendo.editor.format|The title of the tool that lets users choose block formats.\"\n format=\"Format\"\n i18n-imageAltText=\"kendo.editor.imageAltText|The caption for the image alternate text in the insertImage dialog.\"\n imageAltText=\"Alternate text\"\n i18n-imageHeight=\"kendo.editor.imageHeight|The caption for the image height in the insertImage dialog.\"\n imageHeight=\"Height (px)\"\n i18n-imageWebAddress=\"kendo.editor.imageWebAddress|The caption for the image URL in the insertImage dialog.\"\n imageWebAddress=\"Web address\"\n i18n-imageWidth=\"kendo.editor.imageWidth|The caption for the image width in the insertImage dialog.\"\n imageWidth=\"Width (px)\"\n i18n-indent=\"kendo.editor.indent|The title of the tool that indents the content.\"\n indent=\"Indent\"\n i18n-insertFile=\"kendo.editor.insertFile|The title of the tool that inserts links to files.\"\n insertFile=\"Insert file\"\n i18n-insertImage=\"kendo.editor.insertImage|The title of the tool that inserts images.\"\n insertImage=\"Insert image\"\n i18n-insertOrderedList=\"kendo.editor.insertOrderedList|The title of the tool that inserts an ordered list.\"\n insertOrderedList=\"Insert ordered list\"\n i18n-insertUnorderedList=\"kendo.editor.insertUnorderedList|The title of the tool that inserts an unordered list.\"\n insertUnorderedList=\"Insert unordered list\"\n i18n-italic=\"kendo.editor.italic|The title of the tool that makes text italicized.\"\n italic=\"Italic\"\n i18n-linkOpenInNewWindow=\"kendo.editor.linkOpenInNewWindow|The caption for the checkbox for opening the link in a new window in the createLink dialog.\"\n linkOpenInNewWindow=\"Open link in new window\"\n i18n-linkText=\"kendo.editor.linkText|The caption for the link text in the createLink dialog.\"\n linkText=\"Text\"\n i18n-linkTitle=\"kendo.editor.linkTitle|The caption for the link title in the createLink dialog.\"\n linkTitle=\"Title\"\n i18n-linkWebAddress=\"kendo.editor.linkWebAddress|The caption for the URL in the createLink dialog.\"\n linkWebAddress=\"Web address\"\n i18n-outdent=\"kendo.editor.outdent|The title of the tool that outdents the content.\"\n outdent=\"Outdent\"\n i18n-print=\"kendo.editor.print|The title of the print tool.\"\n print=\"Print\"\n i18n-redo=\"kendo.editor.redo|The title of the tool that undos the last action.\"\n redo=\"Redo\"\n i18n-selectAll=\"kendo.editor.selectAll|The title of the tool that selects all content.\"\n selectAll=\"Select All\"\n i18n-strikethrough=\"kendo.editor.strikethrough|The title of the tool that strikes through text.\"\n strikethrough=\"Strikethrough\"\n i18n-subscript=\"kendo.editor.subscript|The title of the tool that makes text subscript.\"\n subscript=\"Subscript\"\n i18n-superscript=\"kendo.editor.superscript|The title of the tool that makes text superscript.\"\n superscript=\"Superscript\"\n i18n-underline=\"kendo.editor.underline|The title of the tool that underlines text.\"\n underline=\"Underline\"\n i18n-unlink=\"kendo.editor.unlink|The title of the tool that removes hyperlinks.\"\n unlink=\"Remove Link\"\n i18n-undo=\"kendo.editor.undo|The title of the tool that undos the last action.\"\n undo=\"Undo\"\n i18n-viewSource=\"kendo.editor.viewSource|The title of the tool that shows the editor value as HTML.\"\n viewSource=\"View source\"\n i18n-insertTable=\"kendo.editor.insertTable|The title of the tool that inserts table.\"\n insertTable=\"Insert Table\"\n i18n-addColumnBefore=\"kendo.editor.addColumnBefore|The title of the tool that adds new column before currently selected column.\"\n addColumnBefore=\"Add column before\"\n i18n-addColumnAfter=\"kendo.editor.addColumnAfter|The title of the tool that adds new column after currently selected column.\"\n addColumnAfter=\"Add column after\"\n i18n-addRowBefore=\"kendo.editor.addRowBefore|The title of the tool that adds new row before currently selected row.\"\n addRowBefore=\"Add row before\"\n i18n-addRowAfter=\"kendo.editor.addRowAfter|The title of the tool that adds new row after currently selected row.\"\n addRowAfter=\"Add row after\"\n i18n-deleteColumn=\"kendo.editor.deleteColumn|The title of the tool that deletes a table column.\"\n deleteColumn=\"Delete column\"\n i18n-deleteRow=\"kendo.editor.deleteRow|The title of the tool that deletes a table row.\"\n deleteRow=\"Delete row\"\n i18n-deleteTable=\"kendo.editor.deleteTable|The title of the tool that deletes a table.\"\n deleteTable=\"Delete table\"\n >\n </ng-container>\n\n <ng-content select=\"kendo-toolbar\"></ng-content>\n <kendo-toolbar [overflow]=\"true\" [tabindex]=\"readonly ? -1 : 0\" *ngIf=\"!userToolBarElement\" #defaultToolbar>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-dropdownlist kendoEditorFormat></kendo-toolbar-dropdownlist>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorAlignLeftButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignCenterButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignRightButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorAlignJustifyButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertUnorderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorInsertOrderedListButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorIndentButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorOutdentButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorCreateLinkButton></kendo-toolbar-button>\n <kendo-toolbar-button kendoEditorUnlinkButton></kendo-toolbar-button>\n </kendo-toolbar-buttongroup>\n <kendo-toolbar-button kendoEditorInsertImageButton></kendo-toolbar-button>\n </kendo-toolbar>\n\n <div *ngIf=\"!iframe\" #content [attr.dir]=\"direction\" class=\"k-editor-content\"></div>\n\n <div class=\"k-editor-content\" *ngIf=\"iframe\">\n <iframe #content srcdoc=\"<!DOCTYPE html>\" frameborder=\"0\" class=\"k-iframe\" (load)=\"iframeOnLoad()\"></iframe>\n </div>\n\n <ng-container #dialogsContainer></ng-container>\n ",
3261
3308
  styles: [
3262
3309
  "\n >>> .k-editor-content > .ProseMirror {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n outline: none;\n overflow: auto;\n }\n\n .k-iframe {\n width: 100%;\n height: 100%;\n display: block;\n }\n "
3263
3310
  ]
@@ -6555,4 +6602,4 @@ var EditorModule = /** @class */ (function () {
6555
6602
  * Generated bundle index. Do not edit.
6556
6603
  */
6557
6604
 
6558
- export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, EditorPrintDirective, EditorSelectAllButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorToolsService, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema };
6605
+ export { ColorPickerDialogComponent, FileLinkDialogComponent, FontFamilyDialogComponent, FontSizeDialogComponent, FormatDialogComponent, ImageDialogComponent, InsertTableDialogComponent, SourceDialogComponent, CustomMessagesComponent, EditorLocalizationService, LocalizedMessagesDirective, Messages, EditorAlignCenterButtonDirective, EditorAlignJustifyButtonDirective, EditorAlignLeftButtonDirective, EditorAlignRightButtonDirective, EditorBackColorDirective, EditorColorPickerComponent, EditorForeColorDirective, EditorCleanFormattingButtonDirective, FontFamilyDropDownListComponent, EditorFontFamilyComponent, FontSizeDropDownListComponent, EditorFontSizeComponent, FormatDropDownListComponent, EditorFormatComponent, EditorRedoButtonDirective, EditorUndoButtonDirective, EditorInsertImageButtonDirective, EditorIndentButtonDirective, EditorOutdentButtonDirective, EditorCreateLinkButtonDirective, EditorInsertFileButtonDirective, EditorUnlinkButtonDirective, EditorInsertOrderedListButtonDirective, EditorInsertUnorderedListButtonDirective, EditorPrintDirective, EditorSelectAllButtonDirective, DropDownToolDirective, EditorCommandBase, EditorCommandButton, EditorCommandDialog, EditorViewSourceButtonDirective, EditorAddColumnAfterButtonDirective, EditorAddColumnBeforeButtonDirective, EditorAddRowAfterButtonDirective, EditorAddRowBeforeButtonDirective, EditorDeleteColumnButtonDirective, EditorDeleteRowButtonDirective, EditorDeleteTableButtonDirective, EditorInsertTableButtonComponent, EditorMergeCellsButtonDirective, EditorSplitCellButtonDirective, PopupTableGridComponent, EditorToolsService, EditorBoldButtonDirective, EditorItalicButtonDirective, EditorStrikethroughButtonDirective, EditorSubscriptButtonDirective, EditorSuperscriptButtonDirective, EditorUnderlineButtonDirective, EditorComponent, EditorModule, schema, EditorPasteEvent };
@@ -4,8 +4,9 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- var ɵ0 = function (arg) { return "plugins must be a function, but received " + JSON.stringify(arg) + "."; };
7
+ var ɵ0 = function (arg) { return "plugins must be a function, but received " + JSON.stringify(arg) + "."; }, ɵ1 = function (arg) { return "pastedContent must be a function, but received " + JSON.stringify(arg) + "."; };
8
8
  exports.ɵ0 = ɵ0;
9
+ exports.ɵ1 = ɵ1;
9
10
  /* tslint:disable:variable-name */
10
11
  /**
11
12
  * @hidden
@@ -14,6 +15,7 @@ exports.EditorErrorMessages = {
14
15
  schemaType: 'Expected value of type Schema. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
15
16
  setSchemaOnce: 'The Schema cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/schema/',
16
17
  pluginsCallbackType: ɵ0,
18
+ pastedContentCallbackType: ɵ1,
17
19
  setPluginsOnce: 'The plugins cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/plugins/',
18
20
  setPlaceHolderOnce: 'The placeholder cannot be changed dynamically. See http://www.telerik.com/kendo-angular-ui/components/editor/placeholder/',
19
21
  printTool: 'The Print tool and functionality are supported only in iframe mode. See https://www.telerik.com/kendo-angular-ui-develop/components/editor/api/EditorPrintButtonDirective/'