@worktile/theia 2.3.2 → 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 -6
- 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 +7 -8
- package/esm2015/plugins/quick-insert/quick-insert.plugin.js +40 -0
- package/fesm2015/worktile-theia.js +8 -6
- 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 -131
- package/styles/typo.scss +0 -6
- 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
|
};
|
|
@@ -13294,12 +13296,12 @@
|
|
|
13294
13296
|
var _a;
|
|
13295
13297
|
var editor = this.editor;
|
|
13296
13298
|
if (editor === null || editor === void 0 ? void 0 : editor.selection) {
|
|
13297
|
-
var editableElement = i1.EDITOR_TO_ELEMENT.get(editor);
|
|
13298
|
-
var paddingLeft = window.getComputedStyle(editableElement, null).paddingLeft;
|
|
13299
|
-
var paddingLeftPixels = coercePixelsFromCssValue(paddingLeft);
|
|
13300
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]]);
|
|
13301
|
-
var
|
|
13302
|
-
|
|
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);
|
|
13303
13305
|
}
|
|
13304
13306
|
return false;
|
|
13305
13307
|
};
|