@worktile/theia 2.3.0 → 2.3.3
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 +8 -4
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/plugins/index.js +2 -2
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +6 -4
- package/esm2015/plugins/quick-insert/quick-insert.plugin.js +40 -0
- package/fesm2015/worktile-theia.js +8 -4
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/quick-insert/{quick-insert.plugint.d.ts → quick-insert.plugin.d.ts} +0 -0
- package/styles/editor.scss +136 -132
- package/esm2015/plugins/quick-insert/quick-insert.plugint.js +0 -38
|
@@ -12156,7 +12156,9 @@
|
|
|
12156
12156
|
var rootNode = i1.AngularEditor.toDOMNode(editor, slate.Node.ancestor(editor, [editor.selection.anchor.path[0]]));
|
|
12157
12157
|
var theEditorComponent = editor.injector.get(TheEditorComponent);
|
|
12158
12158
|
var quickToolbars = theEditorComponent.quickToolbarItems;
|
|
12159
|
-
|
|
12159
|
+
var leafElement = rootNode.querySelector('[data-slate-leaf="true"]');
|
|
12160
|
+
var origin = leafElement || rootNode;
|
|
12161
|
+
QuickInsertEditor.openQuickToolbar(editor, quickToolbars, origin);
|
|
12160
12162
|
}
|
|
12161
12163
|
onKeydown(event);
|
|
12162
12164
|
};
|
|
@@ -13295,9 +13297,11 @@
|
|
|
13295
13297
|
var editor = this.editor;
|
|
13296
13298
|
if (editor === null || editor === void 0 ? void 0 : editor.selection) {
|
|
13297
13299
|
var block = slate.Node.ancestor(editor, [(_a = editor === null || editor === void 0 ? void 0 : editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]]);
|
|
13298
|
-
var
|
|
13299
|
-
var
|
|
13300
|
-
|
|
13300
|
+
var rootElement = i1.AngularEditor.toDOMNode(editor, block);
|
|
13301
|
+
var leafElement = rootElement.querySelector('[data-slate-leaf="true"]');
|
|
13302
|
+
var rootElementRect = rootElement.getBoundingClientRect();
|
|
13303
|
+
var leafElementRect = leafElement.getBoundingClientRect();
|
|
13304
|
+
return (leafElementRect === null || leafElementRect === void 0 ? void 0 : leafElementRect.x) !== (rootElementRect === null || rootElementRect === void 0 ? void 0 : rootElementRect.x);
|
|
13301
13305
|
}
|
|
13302
13306
|
return false;
|
|
13303
13307
|
};
|