@worktile/theia 2.1.12 → 2.1.13
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/bundles/worktile-theia.umd.js +12 -9
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/components/text/text.component.js +2 -5
- package/esm2015/plugins/font-size/font-size.editor.js +2 -2
- package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +13 -6
- package/fesm2015/worktile-theia.js +12 -9
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/inline-code/inline-code.component.scss +2 -1
- package/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.d.ts +1 -0
- package/styles/editor.scss +12 -0
|
@@ -689,10 +689,7 @@
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
var fontSize = this.text[exports.MarkTypes.fontSize];
|
|
692
|
-
|
|
693
|
-
var attr = "the-" + exports.MarkTypes.fontSize;
|
|
694
|
-
this.renderer2.setAttribute(this.elementRef.nativeElement, attr, fontSize);
|
|
695
|
-
}
|
|
692
|
+
this.renderer2.setAttribute(this.elementRef.nativeElement, "the-" + exports.MarkTypes.fontSize, fontSize ? fontSize : null);
|
|
696
693
|
if (this.text[exports.MarkTypes.color]) {
|
|
697
694
|
this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[exports.MarkTypes.color]);
|
|
698
695
|
}
|
|
@@ -11870,14 +11867,17 @@
|
|
|
11870
11867
|
}
|
|
11871
11868
|
TheQuickToolbarComponent.prototype.handleMouseDown = function (event) {
|
|
11872
11869
|
if (!this.elementRef.nativeElement.contains(event.target)) {
|
|
11873
|
-
this.
|
|
11870
|
+
QuickInsertEditor.closeQuickToolbar(this.editor);
|
|
11874
11871
|
}
|
|
11875
11872
|
else {
|
|
11876
11873
|
event.preventDefault();
|
|
11877
11874
|
}
|
|
11878
11875
|
};
|
|
11879
11876
|
TheQuickToolbarComponent.prototype.handleEnter = function () {
|
|
11880
|
-
this.
|
|
11877
|
+
QuickInsertEditor.closeQuickToolbar(this.editor);
|
|
11878
|
+
};
|
|
11879
|
+
TheQuickToolbarComponent.prototype.handleEsc = function () {
|
|
11880
|
+
QuickInsertEditor.closeQuickToolbar(this.editor);
|
|
11881
11881
|
};
|
|
11882
11882
|
TheQuickToolbarComponent.prototype.ngOnInit = function () {
|
|
11883
11883
|
this.editorElement = i1.AngularEditor.toDOMNode(this.editor, this.editor);
|
|
@@ -11894,7 +11894,7 @@
|
|
|
11894
11894
|
};
|
|
11895
11895
|
TheQuickToolbarComponent.prototype.removeHotKey = function () {
|
|
11896
11896
|
var node = slate.Node.get(this.editor, this.editor.selection.anchor.path);
|
|
11897
|
-
if (node &&
|
|
11897
|
+
if (node && QUICK_TOOLBAR_HOTKEY === node.text) {
|
|
11898
11898
|
slate.Editor.deleteBackward(this.editor);
|
|
11899
11899
|
}
|
|
11900
11900
|
};
|
|
@@ -11904,7 +11904,7 @@
|
|
|
11904
11904
|
return TheQuickToolbarComponent;
|
|
11905
11905
|
}(core.mixinUnsubscribe(core.MixinBase)));
|
|
11906
11906
|
TheQuickToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, deps: [{ token: i1__namespace$3.ThyPopoverRef }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11907
|
-
TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
11907
|
+
TheQuickToolbarComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace$2.ThySelectionListComponent, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { type: i5__namespace$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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
11908
11908
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TheQuickToolbarComponent, decorators: [{
|
|
11909
11909
|
type: i0.Component,
|
|
11910
11910
|
args: [{
|
|
@@ -11921,6 +11921,9 @@
|
|
|
11921
11921
|
}], handleEnter: [{
|
|
11922
11922
|
type: i0.HostListener,
|
|
11923
11923
|
args: ['document: keydown.enter']
|
|
11924
|
+
}], handleEsc: [{
|
|
11925
|
+
type: i0.HostListener,
|
|
11926
|
+
args: ['document: keydown.escape']
|
|
11924
11927
|
}] } });
|
|
11925
11928
|
|
|
11926
11929
|
var OperationTypes = ['insert_text', 'remove_node', 'merge_node'];
|
|
@@ -12039,7 +12042,7 @@
|
|
|
12039
12042
|
return;
|
|
12040
12043
|
}
|
|
12041
12044
|
// unset fontSize
|
|
12042
|
-
if (isDefaultFontSize
|
|
12045
|
+
if (isDefaultFontSize) {
|
|
12043
12046
|
FontSizeEditor.unsetFontSize(editor, size);
|
|
12044
12047
|
return;
|
|
12045
12048
|
}
|