@ones-editor/editor 3.0.1-beta.12 → 3.0.1-beta.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.
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +10 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75480,6 +75480,11 @@ ${codeText}
|
|
|
75480
75480
|
});
|
|
75481
75481
|
});
|
|
75482
75482
|
__publicField(this, "handleClose", () => {
|
|
75483
|
+
const activeElem = document.activeElement;
|
|
75484
|
+
const tagName = activeElem ? activeElem.tagName.toLowerCase() : "";
|
|
75485
|
+
if (tagName === "input" || tagName === "textarea") {
|
|
75486
|
+
return;
|
|
75487
|
+
}
|
|
75483
75488
|
this.editor.focus();
|
|
75484
75489
|
});
|
|
75485
75490
|
__publicField(this, "handleSelectionChange", () => {
|
|
@@ -78869,14 +78874,13 @@ ${docStr}
|
|
|
78869
78874
|
insertIndex += 1;
|
|
78870
78875
|
} else {
|
|
78871
78876
|
editor.clearSelectedContents();
|
|
78872
|
-
const { blockId } = editor.selection.range.start;
|
|
78877
|
+
const { blockId, offset } = editor.selection.range.start;
|
|
78873
78878
|
const block = editor.getBlockById(blockId);
|
|
78874
78879
|
insertIndex = getBlockIndex(block);
|
|
78875
78880
|
container = getParentContainer(block);
|
|
78876
|
-
if (!isEmptyTextBlock(editor, block)) {
|
|
78881
|
+
if (!isEmptyTextBlock(editor, block) && offset > 0) {
|
|
78877
78882
|
insertIndex += 1;
|
|
78878
|
-
}
|
|
78879
|
-
if (isRootContainer(container) && insertIndex === 0) {
|
|
78883
|
+
} else if (isRootContainer(container) && insertIndex === 0 && isTitleBlock$2(block)) {
|
|
78880
78884
|
insertIndex += 1;
|
|
78881
78885
|
}
|
|
78882
78886
|
}
|
|
@@ -95964,7 +95968,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95964
95968
|
}
|
|
95965
95969
|
}
|
|
95966
95970
|
});
|
|
95967
|
-
editor.version = "3.0.1-beta.
|
|
95971
|
+
editor.version = "3.0.1-beta.14";
|
|
95968
95972
|
return editor;
|
|
95969
95973
|
}
|
|
95970
95974
|
function isDoc(doc2) {
|
|
@@ -96098,7 +96102,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96098
96102
|
OnesEditorDropTarget.register(editor);
|
|
96099
96103
|
OnesEditorTocProvider.register(editor);
|
|
96100
96104
|
OnesEditorExclusiveBlock.register(editor);
|
|
96101
|
-
editor.version = "3.0.1-beta.
|
|
96105
|
+
editor.version = "3.0.1-beta.14";
|
|
96102
96106
|
return editor;
|
|
96103
96107
|
}
|
|
96104
96108
|
async function showDocVersions(editor, options, serverUrl) {
|