@ones-editor/editor 2.9.8-beta.55 → 2.9.8-beta.57
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/dist/index.js
CHANGED
|
@@ -26188,6 +26188,11 @@ var __publicField = (obj, key, value) => {
|
|
|
26188
26188
|
this.callbacks.onBlur();
|
|
26189
26189
|
this.focused = false;
|
|
26190
26190
|
});
|
|
26191
|
+
__publicField(this, "handleWindowBlur", () => {
|
|
26192
|
+
if (document.activeElement === this.inputElement) {
|
|
26193
|
+
this.handleBlur();
|
|
26194
|
+
}
|
|
26195
|
+
});
|
|
26191
26196
|
__publicField(this, "handleWindowFocus", () => {
|
|
26192
26197
|
if (document.activeElement === this.inputElement) {
|
|
26193
26198
|
this.focus();
|
|
@@ -26347,7 +26352,7 @@ var __publicField = (obj, key, value) => {
|
|
|
26347
26352
|
document.addEventListener("selectionchange", this.handleDocumentSelectionChange);
|
|
26348
26353
|
this.editor.addListener("selectionChanged", this.handleEditorSelectionChanged);
|
|
26349
26354
|
this.editor.addListener("readonlyChanged", this.handleReadonlyChanged);
|
|
26350
|
-
window.addEventListener("blur", this.
|
|
26355
|
+
window.addEventListener("blur", this.handleWindowBlur);
|
|
26351
26356
|
window.addEventListener("focus", this.handleWindowFocus);
|
|
26352
26357
|
}
|
|
26353
26358
|
isInCommandBar(target) {
|
|
@@ -26377,7 +26382,7 @@ var __publicField = (obj, key, value) => {
|
|
|
26377
26382
|
input2.oninput = null;
|
|
26378
26383
|
input2.oncopy = null;
|
|
26379
26384
|
document.removeEventListener("paste", this.handlePaste);
|
|
26380
|
-
window.removeEventListener("blur", this.
|
|
26385
|
+
window.removeEventListener("blur", this.handleWindowBlur);
|
|
26381
26386
|
window.removeEventListener("focus", this.handleWindowFocus);
|
|
26382
26387
|
input2.oncut = null;
|
|
26383
26388
|
}
|
|
@@ -29312,6 +29317,12 @@ var __publicField = (obj, key, value) => {
|
|
|
29312
29317
|
tryDeleteEmptyBlock(editor, block);
|
|
29313
29318
|
editor.selection.selectBlock(prevBlock2, getBlockTextLength$6(editor, prevBlock2));
|
|
29314
29319
|
}
|
|
29320
|
+
} else {
|
|
29321
|
+
if (!isTitleBlock$2(block) && isHeadingBlock$1(block)) {
|
|
29322
|
+
const blockData = editor.getBlockData(block);
|
|
29323
|
+
const { heading, id, type, ...rest } = blockData;
|
|
29324
|
+
editorUpdateBlockData(editor, block, rest, editor.selection.range.toDocRange());
|
|
29325
|
+
}
|
|
29315
29326
|
}
|
|
29316
29327
|
}
|
|
29317
29328
|
} else {
|
|
@@ -54866,7 +54877,6 @@ ${codeText}
|
|
|
54866
54877
|
id: "editor-toolbar",
|
|
54867
54878
|
overflowBoundary: popover == null ? void 0 : popover.overflowBoundary,
|
|
54868
54879
|
refuseOverflow: true,
|
|
54869
|
-
padding: 20,
|
|
54870
54880
|
showName: clientType.isMobile,
|
|
54871
54881
|
autoClose: clientType.isMobile ? true : void 0,
|
|
54872
54882
|
appendTo: (objectToolbar == null ? void 0 : objectToolbar.appendTo) || (popover == null ? void 0 : popover.appendTo)
|
|
@@ -95864,7 +95874,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95864
95874
|
}
|
|
95865
95875
|
}
|
|
95866
95876
|
});
|
|
95867
|
-
editor.version = "2.9.8-beta.
|
|
95877
|
+
editor.version = "2.9.8-beta.57";
|
|
95868
95878
|
return editor;
|
|
95869
95879
|
}
|
|
95870
95880
|
function isDoc(doc2) {
|
|
@@ -95997,7 +96007,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95997
96007
|
OnesEditorDropTarget.register(editor);
|
|
95998
96008
|
OnesEditorTocProvider.register(editor);
|
|
95999
96009
|
OnesEditorExclusiveBlock.register(editor);
|
|
96000
|
-
editor.version = "2.9.8-beta.
|
|
96010
|
+
editor.version = "2.9.8-beta.57";
|
|
96001
96011
|
return editor;
|
|
96002
96012
|
}
|
|
96003
96013
|
async function showDocVersions(editor, options, serverUrl) {
|