@worktile/theia 2.1.10 → 2.1.14

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.
@@ -196,74 +196,6 @@ const LIST_BLOCK_TYPES = [ElementKinds.numberedList, ElementKinds.bulletedList];
196
196
  const VOID_BLOCK_TYPES = [ElementKinds.image, ElementKinds.hr];
197
197
  const BLOCK_DELETEBACKWARD_TYPES = [ElementKinds.tableCell];
198
198
 
199
- const TheToolbarGroupToken = new InjectionToken('the-toolbar-group-token');
200
- const QUICK_TOOLBAR_HOTKEY = '/';
201
- var DropdownMode;
202
- (function (DropdownMode) {
203
- DropdownMode["icon"] = "icon-mode";
204
- DropdownMode["text"] = "text-mode";
205
- })(DropdownMode || (DropdownMode = {}));
206
- var ToolbarItemMode;
207
- (function (ToolbarItemMode) {
208
- ToolbarItemMode[ToolbarItemMode["horizontal"] = 0] = "horizontal";
209
- ToolbarItemMode[ToolbarItemMode["vertical"] = 1] = "vertical";
210
- })(ToolbarItemMode || (ToolbarItemMode = {}));
211
- const DefaultGlobalToolbarDefinition = [
212
- ElementKinds.headingList,
213
- ToolbarActionTypes.split,
214
- MarkTypes.bold,
215
- MarkTypes.italic,
216
- MarkTypes.underline,
217
- MarkTypes.strike,
218
- ElementKinds.inlineCode,
219
- MarkTypes.color,
220
- MarkTypes.backgroundColor,
221
- ToolbarActionTypes.split,
222
- ToolbarActionTypes.alignType,
223
- ToolbarActionTypes.verticalAlign,
224
- ToolbarActionTypes.split,
225
- ElementKinds.numberedList,
226
- ElementKinds.bulletedList,
227
- ToolbarActionTypes.split,
228
- ElementKinds.link,
229
- ElementKinds.image,
230
- ElementKinds.table,
231
- ElementKinds.blockquote,
232
- ElementKinds.code
233
- ];
234
- const DefaultInlineToolbarDefinition = [
235
- ToolbarActionTypes.clean,
236
- ToolbarActionTypes.split,
237
- MarkTypes.bold,
238
- MarkTypes.italic,
239
- MarkTypes.underline,
240
- MarkTypes.strike,
241
- ElementKinds.inlineCode,
242
- MarkTypes.color,
243
- MarkTypes.backgroundColor,
244
- ToolbarActionTypes.split,
245
- ToolbarActionTypes.alignType,
246
- ToolbarActionTypes.split,
247
- ElementKinds.link
248
- ];
249
- const DefaultQuickToolbarDefinition = [
250
- ...STANDARD_HEADING_TYPES,
251
- ToolbarActionTypes.split,
252
- ElementKinds.numberedList,
253
- ElementKinds.bulletedList,
254
- ToolbarActionTypes.split,
255
- ElementKinds.link,
256
- ElementKinds.image,
257
- ElementKinds.table,
258
- ElementKinds.blockquote,
259
- ElementKinds.hr,
260
- ElementKinds.code
261
- ];
262
- const ToolbarMoreGroup = {
263
- key: 'more',
264
- icon: 'more'
265
- };
266
-
267
199
  var ErrorCodes;
268
200
  (function (ErrorCodes) {
269
201
  ErrorCodes[ErrorCodes["UNKNOW_ERROR"] = 1000] = "UNKNOW_ERROR";
@@ -353,6 +285,74 @@ const THE_CODE_MODE_PROVIDER = {
353
285
  };
354
286
  const CODEMIRROR_PADDING_TOP = 10;
355
287
 
288
+ const TheToolbarGroupToken = new InjectionToken('the-toolbar-group-token');
289
+ const QUICK_TOOLBAR_HOTKEY = '/';
290
+ var DropdownMode;
291
+ (function (DropdownMode) {
292
+ DropdownMode["icon"] = "icon-mode";
293
+ DropdownMode["text"] = "text-mode";
294
+ })(DropdownMode || (DropdownMode = {}));
295
+ var ToolbarItemMode;
296
+ (function (ToolbarItemMode) {
297
+ ToolbarItemMode[ToolbarItemMode["horizontal"] = 0] = "horizontal";
298
+ ToolbarItemMode[ToolbarItemMode["vertical"] = 1] = "vertical";
299
+ })(ToolbarItemMode || (ToolbarItemMode = {}));
300
+ const DefaultGlobalToolbarDefinition = [
301
+ ElementKinds.headingList,
302
+ ToolbarActionTypes.split,
303
+ MarkTypes.bold,
304
+ MarkTypes.italic,
305
+ MarkTypes.underline,
306
+ MarkTypes.strike,
307
+ ElementKinds.inlineCode,
308
+ MarkTypes.color,
309
+ MarkTypes.backgroundColor,
310
+ ToolbarActionTypes.split,
311
+ ToolbarActionTypes.alignType,
312
+ ToolbarActionTypes.verticalAlign,
313
+ ToolbarActionTypes.split,
314
+ ElementKinds.numberedList,
315
+ ElementKinds.bulletedList,
316
+ ToolbarActionTypes.split,
317
+ ElementKinds.link,
318
+ ElementKinds.image,
319
+ ElementKinds.table,
320
+ ElementKinds.blockquote,
321
+ ElementKinds.code
322
+ ];
323
+ const DefaultInlineToolbarDefinition = [
324
+ ToolbarActionTypes.clean,
325
+ ToolbarActionTypes.split,
326
+ MarkTypes.bold,
327
+ MarkTypes.italic,
328
+ MarkTypes.underline,
329
+ MarkTypes.strike,
330
+ ElementKinds.inlineCode,
331
+ MarkTypes.color,
332
+ MarkTypes.backgroundColor,
333
+ ToolbarActionTypes.split,
334
+ ToolbarActionTypes.alignType,
335
+ ToolbarActionTypes.split,
336
+ ElementKinds.link
337
+ ];
338
+ const DefaultQuickToolbarDefinition = [
339
+ ...STANDARD_HEADING_TYPES,
340
+ ToolbarActionTypes.split,
341
+ ElementKinds.numberedList,
342
+ ElementKinds.bulletedList,
343
+ ToolbarActionTypes.split,
344
+ ElementKinds.link,
345
+ ElementKinds.image,
346
+ ElementKinds.table,
347
+ ElementKinds.blockquote,
348
+ ElementKinds.hr,
349
+ ElementKinds.code
350
+ ];
351
+ const ToolbarMoreGroup = {
352
+ key: 'more',
353
+ icon: 'more'
354
+ };
355
+
356
356
  class TheTextComponent extends BaseTextComponent {
357
357
  constructor(elementRef, renderer2, cdr) {
358
358
  super(elementRef, cdr);
@@ -374,10 +374,7 @@ class TheTextComponent extends BaseTextComponent {
374
374
  }
375
375
  }
376
376
  const fontSize = this.text[MarkTypes.fontSize];
377
- if (fontSize) {
378
- const attr = `the-${MarkTypes.fontSize}`;
379
- this.renderer2.setAttribute(this.elementRef.nativeElement, attr, fontSize);
380
- }
377
+ this.renderer2.setAttribute(this.elementRef.nativeElement, `the-${MarkTypes.fontSize}`, fontSize ? fontSize : null);
381
378
  if (this.text[MarkTypes.color]) {
382
379
  this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[MarkTypes.color]);
383
380
  }
@@ -1671,6 +1668,13 @@ const ListEditor = {
1671
1668
  Transforms.setNodes(editor, { type: ElementKinds.paragraph, checked: undefined }, // todo remove checked
1672
1669
  { at: path });
1673
1670
  }
1671
+ else if (Element$1.isElement(node) && node.type === ElementKinds.paragraph) {
1672
+ let { textIndent } = node;
1673
+ if (textIndent) {
1674
+ Transforms.setNodes(editor, { textIndent: undefined }, // remove textIndent
1675
+ { at: path });
1676
+ }
1677
+ }
1674
1678
  if (Node.parent(editor, path).type !== ElementKinds.listItem) {
1675
1679
  Transforms.wrapNodes(editor, { type: ElementKinds.listItem, children: [] }, {
1676
1680
  at: path,
@@ -10682,7 +10686,7 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
10682
10686
  execute(event) {
10683
10687
  var _a, _b;
10684
10688
  super.execute(event);
10685
- if (!((_a = this.item) === null || _a === void 0 ? void 0 : _a.execute) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.disabled)) {
10689
+ if (((_a = this.editor) === null || _a === void 0 ? void 0 : _a.readOnly) || ((_b = this.editor) === null || _b === void 0 ? void 0 : _b.disabled)) {
10686
10690
  return;
10687
10691
  }
10688
10692
  this.openPopover();
@@ -10715,7 +10719,7 @@ class TheVerticalToolbarItemComponent extends TheToolbarBaseItemComponent {
10715
10719
  }
10716
10720
  }
10717
10721
  TheVerticalToolbarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheVerticalToolbarItemComponent, deps: [{ token: i0.ElementRef }, { token: i1$6.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
10718
- TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n [ngStyle]=\"menu?.styles\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
10722
+ TheVerticalToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheVerticalToolbarItemComponent, selector: "the-toolbar-vertical-align-item", inputs: { item: "item", menus: "menus", editor: "editor", toolbarItem: "toolbarItem" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class.hide": "!active" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n thyIconNavLink\n class=\"icon-mode link-with-down\"\n [thyTooltip]=\"toolbarItem?.name\"\n [thyIconNavLinkActive]=\"isOpened\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon [thyIconName]=\"activeMenu?.icon\"></thy-icon>\n <thy-icon class=\"caret-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <thy-action-menu class=\"dropdown\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n thyActionMenuItem\n href=\"javascript:;\"\n [thyActionMenuItemActive]=\"menu.key === activeMenu?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <span *ngIf=\"menu.icon\" thyActionMenuItemIcon>\n <thy-icon [thyIconName]=\"menu?.icon\"></thy-icon>\n </span>\n <span thyActionMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </thy-action-menu>\n</ng-template>\n", components: [{ type: i3.ThyIconNavLinkComponent, selector: "[thyIconNavLink]", inputs: ["thyIconNavLinkIcon", "thyIconNavLinkActive"] }, { type: i4$1.ThyIconComponent, selector: "thy-icon", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { type: i5$2.ThyActionMenuComponent, selector: "thy-action-menu", inputs: ["thyTheme", "thyWidth"] }], directives: [{ type: i5$1.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.ThyActionMenuItemDirective, selector: "[thyActionMenuItem]", inputs: ["thyDisabled", "thyType"] }, { type: i5$2.ThyActionMenuItemActiveDirective, selector: "[thyActionMenuItemActive]", inputs: ["thyActionMenuItemActive"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$2.ThyActionMenuItemIconDirective, selector: "[thyActionMenuItemIcon]" }, { type: i5$2.ThyActionMenuItemNameDirective, selector: "[thyActionMenuItemName]" }] });
10719
10723
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheVerticalToolbarItemComponent, decorators: [{
10720
10724
  type: Component,
10721
10725
  args: [{
@@ -11007,14 +11011,17 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
11007
11011
  }
11008
11012
  handleMouseDown(event) {
11009
11013
  if (!this.elementRef.nativeElement.contains(event.target)) {
11010
- this.popoverRef.close();
11014
+ QuickInsertEditor.closeQuickToolbar(this.editor);
11011
11015
  }
11012
11016
  else {
11013
11017
  event.preventDefault();
11014
11018
  }
11015
11019
  }
11016
11020
  handleEnter() {
11017
- this.popoverRef.close();
11021
+ QuickInsertEditor.closeQuickToolbar(this.editor);
11022
+ }
11023
+ handleEsc() {
11024
+ QuickInsertEditor.closeQuickToolbar(this.editor);
11018
11025
  }
11019
11026
  ngOnInit() {
11020
11027
  this.editorElement = AngularEditor.toDOMNode(this.editor, this.editor);
@@ -11031,7 +11038,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
11031
11038
  }
11032
11039
  removeHotKey() {
11033
11040
  const node = Node.get(this.editor, this.editor.selection.anchor.path);
11034
- if (node && Text.equals({ text: QUICK_TOOLBAR_HOTKEY }, node)) {
11041
+ if (node && QUICK_TOOLBAR_HOTKEY === node.text) {
11035
11042
  Editor.deleteBackward(this.editor);
11036
11043
  }
11037
11044
  }
@@ -11040,7 +11047,7 @@ class TheQuickToolbarComponent extends mixinUnsubscribe(MixinBase) {
11040
11047
  }
11041
11048
  }
11042
11049
  TheQuickToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, deps: [{ token: i1$3.ThyPopoverRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
11043
- TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()" } }, usesInheritance: true, ngImport: i0, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i2$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11050
+ TheQuickToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: TheQuickToolbarComponent, selector: "the-quick-toolbar", inputs: { editor: "editor", quickToolbarItems: "quickToolbarItems" }, host: { listeners: { "document: mousedown": "handleMouseDown($event)", "document: keydown.enter": "handleEnter()", "document: keydown.escape": "handleEsc()" } }, usesInheritance: true, ngImport: i0, template: "<thy-selection-list\n class=\"the-quick-toolbar\"\n [thyBindKeyEventContainer]=\"editorElement\"\n (thySelectionChange)=\"selectionChange($event)\"\n [thyMultiple]=\"false\"\n>\n <ng-container *ngFor=\"let item of quickToolbarItems\">\n <ng-container *ngIf=\"item.key !== ToolbarActionTypes.split; else splitLine\">\n <thy-list-option [thyValue]=\"item?.key\" (mousedown)=\"stopPropagation($event)\">\n <the-toolbar-item [editor]=\"editor\" [item]=\"item\" [itemMode]=\"ToolbarItemMode.vertical\"></the-toolbar-item>\n </thy-list-option>\n </ng-container>\n </ng-container>\n</thy-selection-list>\n\n<ng-template #splitLine>\n <nav-split-line [mode]=\"ToolbarItemMode.horizontal\"></nav-split-line>\n</ng-template>\n", components: [{ type: i2$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5$3.ThyListOptionComponent, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { type: TheToolbarItemComponent, selector: "the-toolbar-item", inputs: ["item", "editor", "itemMode"] }, { type: NavSplitLineComponent, selector: "nav-split-line", inputs: ["mode"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
11044
11051
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TheQuickToolbarComponent, decorators: [{
11045
11052
  type: Component,
11046
11053
  args: [{
@@ -11057,6 +11064,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
11057
11064
  }], handleEnter: [{
11058
11065
  type: HostListener,
11059
11066
  args: ['document: keydown.enter']
11067
+ }], handleEsc: [{
11068
+ type: HostListener,
11069
+ args: ['document: keydown.escape']
11060
11070
  }] } });
11061
11071
 
11062
11072
  const OperationTypes = ['insert_text', 'remove_node', 'merge_node'];
@@ -11170,7 +11180,8 @@ const FontSizeEditor = {
11170
11180
  return;
11171
11181
  }
11172
11182
  // unset fontSize
11173
- if (FontSizeEditor.unsetFontSize(editor, size, fontSizeMark, isDefaultFontSize)) {
11183
+ if (isDefaultFontSize) {
11184
+ FontSizeEditor.unsetFontSize(editor, size);
11174
11185
  return;
11175
11186
  }
11176
11187
  FontSizeEditor.setFontSizeMark(editor, size);
@@ -11183,20 +11194,16 @@ const FontSizeEditor = {
11183
11194
  // set paragraph text fontSize
11184
11195
  Editor.addMark(editor, MarkTypes.fontSize, Number(size));
11185
11196
  },
11186
- unsetFontSize(editor, size, fontSizeMark, isDefaultFontSize) {
11197
+ unsetFontSize(editor, size) {
11187
11198
  const isTable = TableEditor.isActive(editor);
11188
- if (fontSizeMark && isDefaultFontSize) {
11189
- // unset Table selectedCells fontSize
11190
- if (isTable && TableEditor.toggleMark(editor, true, MarkTypes.fontSize, Number(size))) {
11191
- return true;
11192
- }
11193
- // unset paragraph text fontSize
11194
- setMarks(editor, {
11195
- [MarkTypes.fontSize]: null
11196
- }, editor.selection);
11197
- return true;
11199
+ // unset Table selectedCells fontSize
11200
+ if (isTable && TableEditor.toggleMark(editor, true, MarkTypes.fontSize, Number(size))) {
11201
+ return;
11198
11202
  }
11199
- return false;
11203
+ // unset paragraph text fontSize
11204
+ setMarks(editor, {
11205
+ [MarkTypes.fontSize]: null
11206
+ }, editor.selection);
11200
11207
  },
11201
11208
  isFontSizeActive(editor, size) {
11202
11209
  if (editor.selection) {