@progress/kendo-angular-editor 2.5.0 → 3.0.0-dev.202201191455
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-editor.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/common/error-messages.js +4 -3
- package/dist/es/config/command-icons.js +1 -0
- package/dist/es/config/commands.js +18 -17
- package/dist/es/config/schema.js +2 -4
- package/dist/es/config/table-commands.js +1 -363
- package/dist/es/dialogs/colorpicker-dialog.component.js +1 -1
- package/dist/es/dialogs/file-link-dialog.component.js +1 -1
- package/dist/es/dialogs/image-dialog.component.js +1 -1
- package/dist/es/editor-toolbar-state.js +12 -2
- package/dist/es/editor.component.js +103 -75
- package/dist/es/editor.module.js +6 -3
- package/dist/es/index.js +2 -0
- package/dist/es/localization/messages.js +4 -0
- package/dist/es/main.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/{es2015/config/table-nodes.d.ts → es/preventable-events/paste-event-data.js} +0 -5
- package/dist/es/preventable-events/paste-event.js +25 -0
- package/dist/es/tools/blockquote/editor-blockquote-button.directive.js +48 -0
- package/dist/es/tools/colorpicker/editor-colorpicker.component.js +24 -7
- package/dist/es/tools/format/editor-format-dropdownlist.component.js +1 -1
- package/dist/es/tools/format/editor-format.component.js +0 -1
- package/dist/es/tools/tables/popup-table-grid.component.js +1 -1
- package/dist/es2015/common/commands.d.ts +1 -1
- package/dist/es2015/common/error-messages.js +4 -3
- package/dist/es2015/common/format-item.interface.d.ts +1 -1
- package/dist/es2015/common/paste-cleanup-settings.d.ts +14 -0
- package/dist/es2015/config/command-icons.js +1 -0
- package/dist/es2015/config/commands.js +18 -17
- package/dist/es2015/config/schema.d.ts +1 -1
- package/dist/es2015/config/schema.js +2 -3
- package/dist/es2015/config/table-commands.d.ts +0 -36
- package/dist/es2015/config/table-commands.js +1 -357
- package/dist/es2015/dialogs/colorpicker-dialog.component.js +1 -1
- package/dist/es2015/dialogs/file-link-dialog.component.js +4 -4
- package/dist/es2015/dialogs/image-dialog.component.js +4 -4
- package/dist/es2015/editor-toolbar-state.js +12 -2
- package/dist/es2015/editor.component.d.ts +16 -11
- package/dist/es2015/editor.component.js +105 -75
- package/dist/es2015/editor.module.js +6 -3
- package/dist/es2015/index.d.ts +2 -0
- package/dist/es2015/index.js +2 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/localization/messages.d.ts +4 -0
- package/dist/es2015/localization/messages.js +4 -0
- package/dist/es2015/main.d.ts +2 -0
- package/dist/es2015/main.js +1 -0
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/preventable-events/paste-event-data.d.ts +21 -0
- package/dist/es2015/preventable-events/paste-event-data.js +4 -0
- package/dist/es2015/preventable-events/paste-event.d.ts +27 -0
- package/dist/es2015/preventable-events/paste-event.js +20 -0
- package/dist/es2015/tools/blockquote/editor-blockquote-button.directive.d.ts +30 -0
- package/dist/es2015/tools/blockquote/editor-blockquote-button.directive.js +45 -0
- package/dist/es2015/tools/colorpicker/editor-colorpicker.component.d.ts +8 -2
- package/dist/es2015/tools/colorpicker/editor-colorpicker.component.js +20 -7
- package/dist/es2015/tools/format/editor-format-dropdownlist.component.js +0 -4
- package/dist/es2015/tools/format/editor-format.component.js +0 -1
- package/dist/es2015/tools/tables/popup-table-grid.component.js +2 -2
- package/dist/fesm2015/index.js +354 -1624
- package/dist/fesm5/index.js +365 -1649
- package/dist/npm/common/error-messages.js +4 -2
- package/dist/npm/config/command-icons.js +1 -0
- package/dist/npm/config/commands.js +16 -14
- package/dist/npm/config/schema.js +2 -4
- package/dist/npm/config/table-commands.js +1 -368
- package/dist/npm/dialogs/colorpicker-dialog.component.js +1 -1
- package/dist/npm/dialogs/file-link-dialog.component.js +1 -1
- package/dist/npm/dialogs/image-dialog.component.js +1 -1
- package/dist/npm/editor-toolbar-state.js +11 -1
- package/dist/npm/editor.component.js +99 -71
- package/dist/npm/editor.module.js +7 -4
- package/dist/npm/index.js +5 -0
- package/dist/npm/localization/messages.js +4 -0
- package/dist/npm/main.js +2 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/preventable-events/paste-event-data.js +6 -0
- package/dist/npm/preventable-events/paste-event.js +27 -0
- package/dist/npm/tools/blockquote/editor-blockquote-button.directive.js +50 -0
- package/dist/npm/tools/colorpicker/editor-colorpicker.component.js +24 -7
- package/dist/npm/tools/format/editor-format-dropdownlist.component.js +1 -1
- package/dist/npm/tools/format/editor-format.component.js +0 -1
- package/dist/npm/tools/tables/popup-table-grid.component.js +1 -1
- package/dist/systemjs/kendo-angular-editor.js +1 -1
- package/package.json +18 -18
- package/dist/es/config/table-nodes.js +0 -146
- package/dist/es/config/tables/CellSelection.js +0 -268
- package/dist/es/config/tables/TableMap.js +0 -333
- package/dist/es/config/tables/table-utils.js +0 -302
- package/dist/es2015/config/table-nodes.js +0 -145
- package/dist/es2015/config/tables/CellSelection.d.ts +0 -35
- package/dist/es2015/config/tables/CellSelection.js +0 -256
- package/dist/es2015/config/tables/TableMap.d.ts +0 -35
- package/dist/es2015/config/tables/TableMap.js +0 -329
- package/dist/es2015/config/tables/table-utils.d.ts +0 -77
- package/dist/es2015/config/tables/table-utils.js +0 -299
- package/dist/npm/config/table-nodes.js +0 -157
- package/dist/npm/config/tables/CellSelection.js +0 -270
- package/dist/npm/config/tables/TableMap.js +0 -338
- package/dist/npm/config/tables/table-utils.js +0 -307
|
@@ -27,15 +27,16 @@ var editor_localization_service_1 = require("./localization/editor-localization.
|
|
|
27
27
|
var styles_1 = require("./common/styles");
|
|
28
28
|
var error_messages_1 = require("./common/error-messages");
|
|
29
29
|
var tools_service_1 = require("./tools/tools.service");
|
|
30
|
+
var paste_event_1 = require("./preventable-events/paste-event");
|
|
30
31
|
var EMPTY_PARAGRAPH = '<p></p>';
|
|
31
32
|
var defaultPasteCleanupSettings = {
|
|
32
33
|
convertMsLists: false,
|
|
33
34
|
removeAttributes: [],
|
|
34
35
|
removeHtmlComments: false,
|
|
35
|
-
removeInvalidHTML:
|
|
36
|
+
removeInvalidHTML: true,
|
|
36
37
|
removeMsClasses: false,
|
|
37
38
|
removeMsStyles: false,
|
|
38
|
-
stripTags: [
|
|
39
|
+
stripTags: []
|
|
39
40
|
};
|
|
40
41
|
var removeCommentsIf = util_1.conditionallyExecute(kendo_editor_common_1.removeComments);
|
|
41
42
|
var removeInvalidHTMLIf = util_1.conditionallyExecute(kendo_editor_common_1.sanitize);
|
|
@@ -77,14 +78,6 @@ var EditorComponent = /** @class */ (function () {
|
|
|
77
78
|
* @default false
|
|
78
79
|
*/
|
|
79
80
|
this.applyToWord = false;
|
|
80
|
-
/**
|
|
81
|
-
* By design, the Editor emits `valueChange`, updates the model and the ToolBar state on each keystroke.
|
|
82
|
-
* 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.
|
|
83
|
-
* 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.
|
|
84
|
-
* The specified interval (in milliseconds) should be a positive number.
|
|
85
|
-
* By default the `updateInterval` is set to 100 miliseconds. If set to zero the delay will be disabled entirely.
|
|
86
|
-
*/
|
|
87
|
-
this.updateInterval = 100;
|
|
88
81
|
/**
|
|
89
82
|
* By default, whitespace is collapsed as per HTML's rules.
|
|
90
83
|
* Set to `true` to preserve whitespace, but normalize newlines to spaces.
|
|
@@ -110,6 +103,11 @@ var EditorComponent = /** @class */ (function () {
|
|
|
110
103
|
* Fires when the content area of the Editor is focused ([see example]({% slug overview_editor %}#toc-events)).
|
|
111
104
|
*/
|
|
112
105
|
this.onFocus = new core_1.EventEmitter();
|
|
106
|
+
/**
|
|
107
|
+
* Fires when the user performs paste in the content area of the Editor ([see example]({% slug overview_editor %}#toc-events)).
|
|
108
|
+
* The event is preventable. If you cancel it, the Editor content will not change.
|
|
109
|
+
*/
|
|
110
|
+
this.paste = new core_1.EventEmitter();
|
|
113
111
|
/**
|
|
114
112
|
* Fires when the content area of the Editor is blurred ([see example]({% slug overview_editor %}#toc-events)).
|
|
115
113
|
*/
|
|
@@ -125,10 +123,76 @@ var EditorComponent = /** @class */ (function () {
|
|
|
125
123
|
this.valueModified = new rxjs_1.Subject();
|
|
126
124
|
this._readonly = false;
|
|
127
125
|
this._placeholder = '';
|
|
126
|
+
this.inForm = false;
|
|
128
127
|
this.afterViewInit = new rxjs_1.Subject();
|
|
129
128
|
this.contentAreaLoaded = new rxjs_1.Subject();
|
|
130
|
-
this.
|
|
129
|
+
this.dispatchTransaction = function (tr) {
|
|
130
|
+
var docChanged = tr.docChanged;
|
|
131
|
+
if (_this.disabled || (_this.readonly && docChanged)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (docChanged) {
|
|
135
|
+
var doc = tr.doc;
|
|
136
|
+
var html_1 = kendo_editor_common_1.getHtml({ doc: doc });
|
|
137
|
+
_this.trOnChange = tr;
|
|
138
|
+
_this.htmlOnChange = html_1;
|
|
139
|
+
_this.ngZone.run(function () {
|
|
140
|
+
_this.valueModified.next(html_1);
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if (!docChanged || _this.inForm) {
|
|
144
|
+
_this.view.updateState(_this.view.state.apply(tr));
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
this.transformPastedHTML = function (dirtyHtml) {
|
|
148
|
+
var pasteCleanupSettings = tslib_1.__assign({}, defaultPasteCleanupSettings, _this.pasteCleanupSettings);
|
|
149
|
+
var html = util_1.pipe(removeInvalidHTMLIf(pasteCleanupSettings.removeInvalidHTML), removeCommentsIf(pasteCleanupSettings.removeHtmlComments))(dirtyHtml);
|
|
150
|
+
var clean = kendo_editor_common_1.pasteCleanup(html, {
|
|
151
|
+
convertMsLists: pasteCleanupSettings.convertMsLists,
|
|
152
|
+
stripTags: pasteCleanupSettings.stripTags.join('|'),
|
|
153
|
+
attributes: getPasteCleanupAttributes(pasteCleanupSettings)
|
|
154
|
+
});
|
|
155
|
+
if (kendo_angular_common_1.hasObservers(_this.paste)) {
|
|
156
|
+
var event_1 = new paste_event_1.EditorPasteEvent(clean, dirtyHtml, _this._pasteEvent);
|
|
157
|
+
_this.ngZone.run(function () { return _this.paste.emit(event_1); });
|
|
158
|
+
return event_1.isDefaultPrevented() ? '' : event_1.cleanedHtml;
|
|
159
|
+
}
|
|
160
|
+
return clean;
|
|
161
|
+
};
|
|
162
|
+
this.changeValue = function (value) {
|
|
163
|
+
var prev = _this._value;
|
|
164
|
+
_this._value = value;
|
|
165
|
+
if (!_this._view) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (_this.htmlOnChange === value && _this.trOnChange) {
|
|
169
|
+
_this.view.updateState(_this.view.state.apply(_this.trOnChange));
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
if ((prev || '') !== (value || '')) {
|
|
173
|
+
var iframeContentWindowNotPresent = _this.iframe && !_this.container.element.nativeElement.contentWindow;
|
|
174
|
+
if (iframeContentWindowNotPresent) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
var state = _this.view.state;
|
|
178
|
+
var nextDoc = kendo_editor_common_1.parseContent(value || '', state.schema, { preserveWhitespace: _this.preserveWhitespace });
|
|
179
|
+
var tr = state.tr
|
|
180
|
+
.setSelection(new kendo_editor_common_1.AllSelection(state.doc))
|
|
181
|
+
.replaceSelectionWith(nextDoc);
|
|
182
|
+
_this.view.updateState(state.apply(tr));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
_this.trOnChange = null;
|
|
186
|
+
_this.htmlOnChange = null;
|
|
187
|
+
};
|
|
188
|
+
this.onChangeCallback = function (value) {
|
|
189
|
+
_this.changeValue(value);
|
|
190
|
+
};
|
|
131
191
|
this.onTouchedCallback = function (_) { }; // tslint:disable-line:no-empty
|
|
192
|
+
this.onPaste = function (_view, nativeEvent) {
|
|
193
|
+
_this._pasteEvent = nativeEvent;
|
|
194
|
+
return false;
|
|
195
|
+
};
|
|
132
196
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
133
197
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
134
198
|
// https://stackoverflow.com/questions/56572483/chrome-is-synchronously-handling-iframe-loading-whereas-firefox-handles-it-asyn
|
|
@@ -137,6 +201,9 @@ var EditorComponent = /** @class */ (function () {
|
|
|
137
201
|
EditorComponent_1 = EditorComponent;
|
|
138
202
|
Object.defineProperty(EditorComponent.prototype, "value", {
|
|
139
203
|
get: function () {
|
|
204
|
+
if (this.trOnChange) {
|
|
205
|
+
return this.htmlOnChange;
|
|
206
|
+
}
|
|
140
207
|
var value = this._view ? this.getSource() : this._value;
|
|
141
208
|
if (value === EMPTY_PARAGRAPH) {
|
|
142
209
|
return this._value ? '' : this._value;
|
|
@@ -149,23 +216,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
149
216
|
* Sets the value of the Editor ([see example]({% slug overview_editor %}#toc-basic-usage)).
|
|
150
217
|
*/
|
|
151
218
|
set: function (value) {
|
|
152
|
-
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
this._value = value;
|
|
156
|
-
this._previousValue = value;
|
|
157
|
-
if (this._view) {
|
|
158
|
-
var iframeContentWindowNotPresent = this.iframe && !this.container.element.nativeElement.contentWindow;
|
|
159
|
-
if (iframeContentWindowNotPresent) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
this.exec('setHTML', {
|
|
163
|
-
content: this._value || '',
|
|
164
|
-
parseOptions: {
|
|
165
|
-
preserveWhitespace: this.preserveWhitespace
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
219
|
+
this.changeValue(value);
|
|
169
220
|
},
|
|
170
221
|
enumerable: true,
|
|
171
222
|
configurable: true
|
|
@@ -426,6 +477,9 @@ var EditorComponent = /** @class */ (function () {
|
|
|
426
477
|
};
|
|
427
478
|
EditorComponent.prototype.ngOnChanges = function (changes) {
|
|
428
479
|
var _this = this;
|
|
480
|
+
if (changes.value && this.view) {
|
|
481
|
+
this.changeValue(changes.value.currentValue);
|
|
482
|
+
}
|
|
429
483
|
if (changes.iframe && !changes.iframe.isFirstChange()) {
|
|
430
484
|
this.ngZone.onStable.pipe(operators_1.take(1)).subscribe(function () { return _this.initialize(); });
|
|
431
485
|
}
|
|
@@ -453,7 +507,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
453
507
|
* @param {any} attr - Optional parameters for the command. Apart from the following list,
|
|
454
508
|
* the parameters do not expect specific attributes when you call them:
|
|
455
509
|
* - `format` - Accepts an object with the `tag` property.
|
|
456
|
-
* The supported tags are `p
|
|
510
|
+
* The supported tags are `p` and any of the `h1` to `h6` heading tags.
|
|
457
511
|
* - `createLink` - Accepts an object with the `href`, `title`, and `target` properties. The `href` property is mandatory.
|
|
458
512
|
* - `setHTML` - Accepts a `string` parameter.
|
|
459
513
|
* - `insertTable` - Accepts an object with the `rows` and `cols` properties. The number values are zero based.
|
|
@@ -511,8 +565,6 @@ var EditorComponent = /** @class */ (function () {
|
|
|
511
565
|
var command = commands_1.editorCommands[commandName](attr);
|
|
512
566
|
// Executes a ProseMirror command.
|
|
513
567
|
command(this._view.state, this._view.dispatch, this._view);
|
|
514
|
-
// See the `dispatchTransaction` comments.
|
|
515
|
-
// this.stateChange.emit(updateToolBar(this.view));
|
|
516
568
|
};
|
|
517
569
|
/**
|
|
518
570
|
* Opens a dialog.
|
|
@@ -597,6 +649,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
597
649
|
* @hidden
|
|
598
650
|
*/
|
|
599
651
|
EditorComponent.prototype.writeValue = function (value) {
|
|
652
|
+
this.inForm = true;
|
|
600
653
|
// To avoid confusion, non-existent values are always undefined.
|
|
601
654
|
this.value = value === null ? undefined : value;
|
|
602
655
|
};
|
|
@@ -625,7 +678,6 @@ var EditorComponent = /** @class */ (function () {
|
|
|
625
678
|
return;
|
|
626
679
|
}
|
|
627
680
|
var currentSchema = this.schema || schema_1.schema;
|
|
628
|
-
var that = this;
|
|
629
681
|
var containerNativeElement = this.container.element.nativeElement;
|
|
630
682
|
var contentNode = kendo_editor_common_1.parseContent((this.value || '').trim(), currentSchema, { preserveWhitespace: this.preserveWhitespace });
|
|
631
683
|
if (this.iframe) {
|
|
@@ -667,16 +719,13 @@ var EditorComponent = /** @class */ (function () {
|
|
|
667
719
|
}
|
|
668
720
|
}); }
|
|
669
721
|
}),
|
|
670
|
-
new kendo_editor_common_1.Plugin({
|
|
671
|
-
key: new kendo_editor_common_1.PluginKey('editor-filter-disabled-state'),
|
|
672
|
-
filterTransaction: function () { return !_this.disabled; }
|
|
673
|
-
}),
|
|
674
722
|
kendo_editor_common_1.history(),
|
|
675
723
|
kendo_editor_common_1.keymap(kendo_editor_common_1.buildListKeymap(currentSchema)),
|
|
676
724
|
kendo_editor_common_1.keymap(kendo_editor_common_1.buildKeymap(currentSchema, { applyToWord: this.applyToWord })),
|
|
677
725
|
kendo_editor_common_1.keymap(kendo_editor_common_1.baseKeymap),
|
|
678
726
|
kendo_editor_common_1.gapCursor(),
|
|
679
|
-
kendo_editor_common_1.imageResizing()
|
|
727
|
+
kendo_editor_common_1.imageResizing(),
|
|
728
|
+
kendo_editor_common_1.tableEditing()
|
|
680
729
|
];
|
|
681
730
|
if (this.placeholder) {
|
|
682
731
|
defaultPlugins.push(kendo_editor_common_1.placeholder(this.placeholder));
|
|
@@ -696,31 +745,10 @@ var EditorComponent = /** @class */ (function () {
|
|
|
696
745
|
_this._view = new kendo_editor_common_1.EditorView({ mount: _this.viewMountElement }, {
|
|
697
746
|
state: state,
|
|
698
747
|
editable: function () { return !_this.readonly; },
|
|
699
|
-
dispatchTransaction:
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
// When the user utilizes keyboard shortcuts—for example, `Ctrl`+`b`—
|
|
704
|
-
// `tr.docChanged` is `true` and the toolbar is not updated.
|
|
705
|
-
// A possible future solution is to move the keymaps to the service.
|
|
706
|
-
// if (!tr.docChanged) {
|
|
707
|
-
// that.stateChange.emit(updateToolBar(that.view));
|
|
708
|
-
// }
|
|
709
|
-
var value = that.value;
|
|
710
|
-
if (!kendo_editor_common_1.hasSameMarkup(value, that._previousValue, this.state.schema)) {
|
|
711
|
-
that._previousValue = value;
|
|
712
|
-
that.ngZone.run(function () { return that.valueModified.next(value); });
|
|
713
|
-
}
|
|
714
|
-
},
|
|
715
|
-
transformPastedHTML: function (html) {
|
|
716
|
-
var pasteCleanupSettings = tslib_1.__assign({}, defaultPasteCleanupSettings, _this.pasteCleanupSettings);
|
|
717
|
-
var clean = util_1.pipe(removeCommentsIf(pasteCleanupSettings.removeHtmlComments), removeInvalidHTMLIf(pasteCleanupSettings.removeInvalidHTML))(html);
|
|
718
|
-
var attributes = getPasteCleanupAttributes(pasteCleanupSettings);
|
|
719
|
-
return kendo_editor_common_1.pasteCleanup(clean, {
|
|
720
|
-
convertMsLists: pasteCleanupSettings.convertMsLists,
|
|
721
|
-
stripTags: pasteCleanupSettings.stripTags.join('|'),
|
|
722
|
-
attributes: attributes
|
|
723
|
-
});
|
|
748
|
+
dispatchTransaction: _this.dispatchTransaction,
|
|
749
|
+
transformPastedHTML: _this.transformPastedHTML,
|
|
750
|
+
handleDOMEvents: {
|
|
751
|
+
paste: _this.onPaste
|
|
724
752
|
}
|
|
725
753
|
});
|
|
726
754
|
});
|
|
@@ -736,7 +764,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
736
764
|
this.subs.add(rxjs_1.fromEvent(containerElement, 'focusin')
|
|
737
765
|
.subscribe(function () {
|
|
738
766
|
if (_this.readonly) {
|
|
739
|
-
contentAreaClasslist_1.add('k-
|
|
767
|
+
contentAreaClasslist_1.add('k-focus');
|
|
740
768
|
}
|
|
741
769
|
if (!_this.focusChangedProgrammatically || _this.shouldEmitFocus) {
|
|
742
770
|
_this.ngZone.run(function () { return _this.onFocus.emit(); });
|
|
@@ -746,7 +774,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
746
774
|
this.subs.add(rxjs_1.fromEvent(containerElement, 'focusout')
|
|
747
775
|
.subscribe(function () {
|
|
748
776
|
if (_this.readonly) {
|
|
749
|
-
contentAreaClasslist_1.remove('k-
|
|
777
|
+
contentAreaClasslist_1.remove('k-focus');
|
|
750
778
|
}
|
|
751
779
|
if (!_this.focusChangedProgrammatically) {
|
|
752
780
|
_this.ngZone.run(function () { return _this.onBlur.emit(); });
|
|
@@ -761,7 +789,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
761
789
|
_this.cdr.detectChanges();
|
|
762
790
|
}
|
|
763
791
|
}));
|
|
764
|
-
this.subs.add(
|
|
792
|
+
this.subs.add(this.valueModified.subscribe(function (value) {
|
|
765
793
|
_this.onChangeCallback(value);
|
|
766
794
|
_this.valueChange.emit(value);
|
|
767
795
|
_this.cdr.markForCheck();
|
|
@@ -855,10 +883,6 @@ var EditorComponent = /** @class */ (function () {
|
|
|
855
883
|
tslib_1.__metadata("design:type", String),
|
|
856
884
|
tslib_1.__metadata("design:paramtypes", [String])
|
|
857
885
|
], EditorComponent.prototype, "placeholder", null);
|
|
858
|
-
tslib_1.__decorate([
|
|
859
|
-
core_1.Input(),
|
|
860
|
-
tslib_1.__metadata("design:type", Number)
|
|
861
|
-
], EditorComponent.prototype, "updateInterval", void 0);
|
|
862
886
|
tslib_1.__decorate([
|
|
863
887
|
core_1.Input(),
|
|
864
888
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -879,6 +903,10 @@ var EditorComponent = /** @class */ (function () {
|
|
|
879
903
|
core_1.Output('focus'),
|
|
880
904
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
881
905
|
], EditorComponent.prototype, "onFocus", void 0);
|
|
906
|
+
tslib_1.__decorate([
|
|
907
|
+
core_1.Output(),
|
|
908
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
909
|
+
], EditorComponent.prototype, "paste", void 0);
|
|
882
910
|
tslib_1.__decorate([
|
|
883
911
|
core_1.Output('blur'),
|
|
884
912
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
@@ -893,7 +921,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
893
921
|
tslib_1.__metadata("design:paramtypes", [])
|
|
894
922
|
], EditorComponent.prototype, "resizableClass", null);
|
|
895
923
|
tslib_1.__decorate([
|
|
896
|
-
core_1.HostBinding('class.k-
|
|
924
|
+
core_1.HostBinding('class.k-disabled'),
|
|
897
925
|
tslib_1.__metadata("design:type", Boolean),
|
|
898
926
|
tslib_1.__metadata("design:paramtypes", [])
|
|
899
927
|
], EditorComponent.prototype, "isDisabled", null);
|
|
@@ -986,7 +1014,7 @@ var EditorComponent = /** @class */ (function () {
|
|
|
986
1014
|
}
|
|
987
1015
|
],
|
|
988
1016
|
/* tslint:disable:max-line-length */
|
|
989
|
-
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 ",
|
|
1017
|
+
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-blockquote=\"kendo.editor.blockquote|The title of the tool that wraps an element in a blockquote\"\n blockquote=\"Quotation\"\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 ",
|
|
990
1018
|
styles: [
|
|
991
1019
|
"\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 "
|
|
992
1020
|
]
|
|
@@ -13,7 +13,6 @@ var kendo_angular_dropdowns_1 = require("@progress/kendo-angular-dropdowns");
|
|
|
13
13
|
var kendo_angular_dialog_1 = require("@progress/kendo-angular-dialog");
|
|
14
14
|
var kendo_angular_buttons_1 = require("@progress/kendo-angular-buttons");
|
|
15
15
|
var kendo_angular_inputs_1 = require("@progress/kendo-angular-inputs");
|
|
16
|
-
var kendo_angular_inputs_2 = require("@progress/kendo-angular-inputs");
|
|
17
16
|
var editor_component_1 = require("./editor.component");
|
|
18
17
|
var image_dialog_component_1 = require("./dialogs/image-dialog.component");
|
|
19
18
|
var source_dialog_component_1 = require("./dialogs/source-dialog.component");
|
|
@@ -32,6 +31,7 @@ var editor_align_left_button_directive_1 = require("./tools/alignment/editor-ali
|
|
|
32
31
|
var editor_align_center_button_directive_1 = require("./tools/alignment/editor-align-center-button.directive");
|
|
33
32
|
var editor_align_right_button_directive_1 = require("./tools/alignment/editor-align-right-button.directive");
|
|
34
33
|
var editor_align_justify_button_directive_1 = require("./tools/alignment/editor-align-justify-button.directive");
|
|
34
|
+
var editor_blockquote_button_directive_1 = require("./tools/blockquote/editor-blockquote-button.directive");
|
|
35
35
|
var editor_redo_button_directive_1 = require("./tools/history/editor-redo-button.directive");
|
|
36
36
|
var editor_undo_button_directive_1 = require("./tools/history/editor-undo-button.directive");
|
|
37
37
|
var editor_insert_image_button_directive_1 = require("./tools/image/editor-insert-image-button.directive");
|
|
@@ -125,7 +125,9 @@ var COMPONENT_DIRECTIVES = [
|
|
|
125
125
|
// print
|
|
126
126
|
editor_print_button_directive_1.EditorPrintDirective,
|
|
127
127
|
// select all
|
|
128
|
-
select_all_button_directive_1.EditorSelectAllButtonDirective
|
|
128
|
+
select_all_button_directive_1.EditorSelectAllButtonDirective,
|
|
129
|
+
// blockquote
|
|
130
|
+
editor_blockquote_button_directive_1.EditorBlockquoteDirective
|
|
129
131
|
];
|
|
130
132
|
var TOOLBAR_TOOLS = [
|
|
131
133
|
editor_fontsize_component_1.EditorFontSizeComponent,
|
|
@@ -229,9 +231,10 @@ var EditorModule = /** @class */ (function () {
|
|
|
229
231
|
kendo_angular_inputs_1.ColorPickerModule,
|
|
230
232
|
kendo_angular_dialog_1.DialogModule,
|
|
231
233
|
kendo_angular_dropdowns_1.DropDownsModule,
|
|
232
|
-
|
|
234
|
+
kendo_angular_inputs_1.NumericTextBoxModule,
|
|
235
|
+
kendo_angular_inputs_1.CheckBoxModule,
|
|
233
236
|
kendo_angular_toolbar_1.ToolBarModule,
|
|
234
|
-
|
|
237
|
+
kendo_angular_inputs_1.TextBoxModule
|
|
235
238
|
]
|
|
236
239
|
})
|
|
237
240
|
], EditorModule);
|
package/dist/npm/index.js
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
var tslib_1 = require("tslib");
|
|
11
11
|
tslib_1.__exportStar(require("./main"), exports);
|
|
12
|
+
var semantic_nodes_1 = require("./config/semantic-nodes");
|
|
13
|
+
exports.semanticNodes = semantic_nodes_1.semanticNodes
|
|
14
|
+
exports.semanticTagNames = semantic_nodes_1.semanticTagNames
|
|
12
15
|
var colorpicker_dialog_component_1 = require("./dialogs/colorpicker-dialog.component");
|
|
13
16
|
exports.ColorPickerDialogComponent = colorpicker_dialog_component_1.ColorPickerDialogComponent
|
|
14
17
|
var file_link_dialog_component_1 = require("./dialogs/file-link-dialog.component");
|
|
@@ -41,6 +44,8 @@ var editor_align_left_button_directive_1 = require("./tools/alignment/editor-ali
|
|
|
41
44
|
exports.EditorAlignLeftButtonDirective = editor_align_left_button_directive_1.EditorAlignLeftButtonDirective
|
|
42
45
|
var editor_align_right_button_directive_1 = require("./tools/alignment/editor-align-right-button.directive");
|
|
43
46
|
exports.EditorAlignRightButtonDirective = editor_align_right_button_directive_1.EditorAlignRightButtonDirective
|
|
47
|
+
var editor_blockquote_button_directive_1 = require("./tools/blockquote/editor-blockquote-button.directive");
|
|
48
|
+
exports.EditorBlockquoteDirective = editor_blockquote_button_directive_1.EditorBlockquoteDirective
|
|
44
49
|
var editor_back_color_directive_1 = require("./tools/colorpicker/editor-back-color.directive");
|
|
45
50
|
exports.EditorBackColorDirective = editor_back_color_directive_1.EditorBackColorDirective
|
|
46
51
|
var editor_colorpicker_component_1 = require("./tools/colorpicker/editor-colorpicker.component");
|
|
@@ -35,6 +35,10 @@ var Messages = /** @class */ (function (_super) {
|
|
|
35
35
|
core_1.Input(),
|
|
36
36
|
tslib_1.__metadata("design:type", String)
|
|
37
37
|
], Messages.prototype, "backColor", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
core_1.Input(),
|
|
40
|
+
tslib_1.__metadata("design:type", String)
|
|
41
|
+
], Messages.prototype, "blockquote", void 0);
|
|
38
42
|
tslib_1.__decorate([
|
|
39
43
|
core_1.Input(),
|
|
40
44
|
tslib_1.__metadata("design:type", String)
|
package/dist/npm/main.js
CHANGED
|
@@ -34,3 +34,5 @@ exports.dropCursor = kendo_editor_common_1.dropCursor;
|
|
|
34
34
|
exports.gapCursor = kendo_editor_common_1.gapCursor;
|
|
35
35
|
exports.tableNodes = kendo_editor_common_1.tableNodes;
|
|
36
36
|
exports.getSelectionText = kendo_editor_common_1.getSelectionText;
|
|
37
|
+
var paste_event_1 = require("./preventable-events/paste-event");
|
|
38
|
+
exports.EditorPasteEvent = paste_event_1.EditorPasteEvent;
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-editor',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1642603748,
|
|
15
15
|
version: '',
|
|
16
16
|
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'
|
|
17
17
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var tslib_1 = require("tslib");
|
|
8
|
+
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
9
|
+
/**
|
|
10
|
+
* The Editor [`paste`]({% slug api_editor_editorcomponent %}#toc-paste) event.
|
|
11
|
+
*/
|
|
12
|
+
var EditorPasteEvent = /** @class */ (function (_super) {
|
|
13
|
+
tslib_1.__extends(EditorPasteEvent, _super);
|
|
14
|
+
/**
|
|
15
|
+
* Constructs the event arguments for the `paste` event.
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
function EditorPasteEvent(cleanedHtml, originalHtml, originalEvent) {
|
|
19
|
+
var _this = _super.call(this) || this;
|
|
20
|
+
_this.cleanedHtml = cleanedHtml;
|
|
21
|
+
_this.originalHtml = originalHtml;
|
|
22
|
+
_this.originalEvent = originalEvent;
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
return EditorPasteEvent;
|
|
26
|
+
}(kendo_angular_common_1.PreventableEvent));
|
|
27
|
+
exports.EditorPasteEvent = EditorPasteEvent;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
var tslib_1 = require("tslib");
|
|
8
|
+
var core_1 = require("@angular/core");
|
|
9
|
+
var kendo_angular_toolbar_1 = require("@progress/kendo-angular-toolbar");
|
|
10
|
+
var editor_component_1 = require("../../editor.component");
|
|
11
|
+
var editor_command_button_1 = require("../shared/editor-command-button");
|
|
12
|
+
var editor_localization_service_1 = require("../../localization/editor-localization.service");
|
|
13
|
+
var tools_service_1 = require("../tools.service");
|
|
14
|
+
/**
|
|
15
|
+
* A directive which configures an existing `ToolBarButtonComponent` as an Editor Blockquote tool
|
|
16
|
+
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
|
|
17
|
+
* The directive will predefine the `icon` and `click` event handlers of the button.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts-no-run
|
|
21
|
+
* <kendo-toolbar-button kendoEditorBlockquoteButton></kendo-toolbar-button>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* The following example demonstrates how to change the default icon that is applied by the directive.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts-no-run
|
|
28
|
+
* <kendo-toolbar-button kendoEditorBlockquoteButton icon="blogger"></kendo-toolbar-button>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
var EditorBlockquoteDirective = /** @class */ (function (_super) {
|
|
32
|
+
tslib_1.__extends(EditorBlockquoteDirective, _super);
|
|
33
|
+
function EditorBlockquoteDirective(button, editor, localization, toolsService) {
|
|
34
|
+
var _this = _super.call(this, 'blockquote', button, editor, localization, toolsService) || this;
|
|
35
|
+
_this.editor = editor;
|
|
36
|
+
return _this;
|
|
37
|
+
}
|
|
38
|
+
EditorBlockquoteDirective = tslib_1.__decorate([
|
|
39
|
+
core_1.Directive({
|
|
40
|
+
selector: 'kendo-toolbar-button[kendoEditorBlockquoteButton]'
|
|
41
|
+
}),
|
|
42
|
+
tslib_1.__param(1, core_1.Host()),
|
|
43
|
+
tslib_1.__metadata("design:paramtypes", [kendo_angular_toolbar_1.ToolBarButtonComponent,
|
|
44
|
+
editor_component_1.EditorComponent,
|
|
45
|
+
editor_localization_service_1.EditorLocalizationService,
|
|
46
|
+
tools_service_1.EditorToolsService])
|
|
47
|
+
], EditorBlockquoteDirective);
|
|
48
|
+
return EditorBlockquoteDirective;
|
|
49
|
+
}(editor_command_button_1.EditorCommandButton));
|
|
50
|
+
exports.EditorBlockquoteDirective = EditorBlockquoteDirective;
|
|
@@ -34,14 +34,26 @@ var EditorColorPickerComponent = /** @class */ (function (_super) {
|
|
|
34
34
|
*/
|
|
35
35
|
_this.disabled = false;
|
|
36
36
|
/**
|
|
37
|
-
* Specifies whether the ColorPicker will render a gradient, palette or
|
|
37
|
+
* Specifies whether the ColorPicker will render a gradient, palette, or both in its popup.
|
|
38
38
|
*
|
|
39
|
-
* @default 'palette'
|
|
39
|
+
* @default ['palette']
|
|
40
40
|
*/
|
|
41
|
-
_this.
|
|
41
|
+
_this.views = ['palette'];
|
|
42
42
|
return _this;
|
|
43
43
|
}
|
|
44
44
|
EditorColorPickerComponent_1 = EditorColorPickerComponent;
|
|
45
|
+
Object.defineProperty(EditorColorPickerComponent.prototype, "view", {
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*
|
|
49
|
+
* For backward compatibility with configurations using the deprecated "view" input.
|
|
50
|
+
*/
|
|
51
|
+
set: function (view) {
|
|
52
|
+
this.views = [view];
|
|
53
|
+
},
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true
|
|
56
|
+
});
|
|
45
57
|
Object.defineProperty(EditorColorPickerComponent.prototype, "title", {
|
|
46
58
|
/**
|
|
47
59
|
* @hidden
|
|
@@ -123,7 +135,7 @@ var EditorColorPickerComponent = /** @class */ (function (_super) {
|
|
|
123
135
|
editorCommand: this.editorCommand,
|
|
124
136
|
paletteSettings: this.paletteSettings,
|
|
125
137
|
icon: this.icon,
|
|
126
|
-
|
|
138
|
+
views: this.views
|
|
127
139
|
});
|
|
128
140
|
};
|
|
129
141
|
/**
|
|
@@ -174,8 +186,13 @@ var EditorColorPickerComponent = /** @class */ (function (_super) {
|
|
|
174
186
|
], EditorColorPickerComponent.prototype, "disabled", void 0);
|
|
175
187
|
tslib_1.__decorate([
|
|
176
188
|
core_1.Input(),
|
|
177
|
-
tslib_1.__metadata("design:type",
|
|
178
|
-
], EditorColorPickerComponent.prototype, "
|
|
189
|
+
tslib_1.__metadata("design:type", Array)
|
|
190
|
+
], EditorColorPickerComponent.prototype, "views", void 0);
|
|
191
|
+
tslib_1.__decorate([
|
|
192
|
+
core_1.Input(),
|
|
193
|
+
tslib_1.__metadata("design:type", String),
|
|
194
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
195
|
+
], EditorColorPickerComponent.prototype, "view", null);
|
|
179
196
|
tslib_1.__decorate([
|
|
180
197
|
core_1.ViewChild('toolbarTemplate', { static: true }),
|
|
181
198
|
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
@@ -200,7 +217,7 @@ var EditorColorPickerComponent = /** @class */ (function (_super) {
|
|
|
200
217
|
core_1.Component({
|
|
201
218
|
providers: [{ provide: kendo_angular_toolbar_1.ToolBarToolComponent, useExisting: core_1.forwardRef(function () { return EditorColorPickerComponent_1; }) }],
|
|
202
219
|
selector: 'kendo-toolbar-colorpicker',
|
|
203
|
-
template: "\n <ng-template #toolbarTemplate>\n <kendo-colorpicker\n #colorpicker\n [
|
|
220
|
+
template: "\n <ng-template #toolbarTemplate>\n <kendo-colorpicker\n #colorpicker\n [views]=\"['palette']\"\n [format]=\"'hex'\"\n [attr.title]=\"title\"\n [icon]=\"icon\"\n [value]=\"value\"\n [paletteSettings]=\"paletteSettings\"\n [disabled]=\"disabled\"\n [tabindex]=\"tabindex\"\n (valueChange)=\"handleValueChange($event)\"\n (activeColorClick)=\"handleActiveColorClick($event)\"\n (open)=\"onOpen(colorpicker)\"\n (close)=\"onClose(colorpicker)\"\n >\n </kendo-colorpicker>\n </ng-template>\n <ng-template #popupTemplate>\n <button\n tabindex=\"-1\"\n type=\"button\"\n kendoButton\n #colorPickerButton\n class=\"k-overflow-button\"\n [icon]=\"icon\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [tabindex]=\"tabindex\"\n (click)=\"openDialog()\"\n >\n {{ title }}\n </button>\n </ng-template>\n "
|
|
204
221
|
}),
|
|
205
222
|
tslib_1.__param(0, core_1.Host()),
|
|
206
223
|
tslib_1.__metadata("design:paramtypes", [editor_component_1.EditorComponent,
|
|
@@ -64,7 +64,7 @@ var FormatDropDownListComponent = /** @class */ (function () {
|
|
|
64
64
|
core_1.Component({
|
|
65
65
|
// tslint:disable-next-line:no-forward-ref
|
|
66
66
|
selector: 'kendo-editor-format-dropdownlist',
|
|
67
|
-
template: "\n <kendo-dropdownlist\n #element\n kendoEditorDropDownTool\n [defaultItem]=\"defaultItem\"\n [textField]=\"'text'\"\n [valueField]=\"'tag'\"\n [data]=\"data\"\n [(value)]=\"value\"\n [valuePrimitive]=\"true\"\n [itemDisabled]=\"itemDisabled\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [tabindex]=\"tabindex\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <ng-container [ngSwitch]=\"dataItem.tag\">\n <span *ngSwitchCase=\"'h1'\" style=\"display: block; font-size: 2em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h2'\" style=\"display: block; font-size: 1.5em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h3'\" style=\"display: block; font-size: 1.17em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h4'\" style=\"display: block; font-size: 1em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h5'\" style=\"display: block; font-size: .83em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h6'\" style=\"display: block; font-size: .67em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'p'\" style=\"display: block; margin-left: 0;\">\n {{ dataItem.text }}\n </span>\n\n <span *
|
|
67
|
+
template: "\n <kendo-dropdownlist\n #element\n kendoEditorDropDownTool\n [defaultItem]=\"defaultItem\"\n [textField]=\"'text'\"\n [valueField]=\"'tag'\"\n [data]=\"data\"\n [(value)]=\"value\"\n [valuePrimitive]=\"true\"\n [itemDisabled]=\"itemDisabled\"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [tabindex]=\"tabindex\"\n (valueChange)=\"onValueChange($event)\"\n >\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <ng-container [ngSwitch]=\"dataItem.tag\">\n <span *ngSwitchCase=\"'h1'\" style=\"display: block; font-size: 2em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h2'\" style=\"display: block; font-size: 1.5em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h3'\" style=\"display: block; font-size: 1.17em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h4'\" style=\"display: block; font-size: 1em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h5'\" style=\"display: block; font-size: .83em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'h6'\" style=\"display: block; font-size: .67em; margin-left: 0; font-weight: bold;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchCase=\"'p'\" style=\"display: block; margin-left: 0;\">\n {{ dataItem.text }}\n </span>\n\n <span *ngSwitchDefault>{{ dataItem.text }}</span>\n </ng-container>\n </ng-template>\n </kendo-dropdownlist>\n "
|
|
68
68
|
})
|
|
69
69
|
], FormatDropDownListComponent);
|
|
70
70
|
return FormatDropDownListComponent;
|