@ones-editor/editor 2.9.8-beta.67 → 2.9.8-beta.69
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.
|
@@ -12,6 +12,7 @@ export default class OnesEditorToolbar implements OnesEditorHoveringBlockFilter,
|
|
|
12
12
|
private oldRange;
|
|
13
13
|
private hoveringBlock;
|
|
14
14
|
private hoveringTextChild;
|
|
15
|
+
private targetTextChild;
|
|
15
16
|
private _disableTextToolbar;
|
|
16
17
|
private _lastClickTime;
|
|
17
18
|
private _disabled;
|
package/dist/index.js
CHANGED
|
@@ -50588,6 +50588,7 @@ ${codeText}
|
|
|
50588
50588
|
} else {
|
|
50589
50589
|
editor.updateBlockData(block, { heading });
|
|
50590
50590
|
}
|
|
50591
|
+
editor.emit("selectionChanged", editor);
|
|
50591
50592
|
}
|
|
50592
50593
|
function applyAlignStyle(editor, block, align) {
|
|
50593
50594
|
const alignMap = ["left", "center", "right"];
|
|
@@ -50596,11 +50597,13 @@ ${codeText}
|
|
|
50596
50597
|
} else {
|
|
50597
50598
|
editor.updateBlockData(block, { align: null });
|
|
50598
50599
|
}
|
|
50600
|
+
editor.emit("selectionChanged", editor);
|
|
50599
50601
|
}
|
|
50600
50602
|
function applyQuoteStyle(editor, block) {
|
|
50601
50603
|
const oldData = editor.getBlockData(block);
|
|
50602
50604
|
const oldBlockQuote = oldData.quoted;
|
|
50603
50605
|
editor.updateBlockData(block, { quoted: oldBlockQuote ? void 0 : true });
|
|
50606
|
+
editor.emit("selectionChanged", editor);
|
|
50604
50607
|
}
|
|
50605
50608
|
const basicCommands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
50606
50609
|
__proto__: null,
|
|
@@ -54748,6 +54751,7 @@ ${codeText}
|
|
|
54748
54751
|
__publicField(this, "oldRange", null);
|
|
54749
54752
|
__publicField(this, "hoveringBlock", null);
|
|
54750
54753
|
__publicField(this, "hoveringTextChild", null);
|
|
54754
|
+
__publicField(this, "targetTextChild", null);
|
|
54751
54755
|
__publicField(this, "_disableTextToolbar", false);
|
|
54752
54756
|
__publicField(this, "_lastClickTime", 0);
|
|
54753
54757
|
__publicField(this, "_disabled", false);
|
|
@@ -54769,7 +54773,7 @@ ${codeText}
|
|
|
54769
54773
|
this.toolbar.close("clickItem");
|
|
54770
54774
|
}
|
|
54771
54775
|
if (this.hoveringBlock) {
|
|
54772
|
-
executeObjectCommand(this.editor, this.hoveringBlock, this.hoveringTextChild, item);
|
|
54776
|
+
executeObjectCommand(this.editor, this.hoveringBlock, this.hoveringTextChild || this.targetTextChild, item);
|
|
54773
54777
|
}
|
|
54774
54778
|
}
|
|
54775
54779
|
this._lastClickTime = Date.now();
|
|
@@ -55071,6 +55075,7 @@ ${codeText}
|
|
|
55071
55075
|
if (!this.hoveringBlock) {
|
|
55072
55076
|
return new DOMRect();
|
|
55073
55077
|
}
|
|
55078
|
+
this.targetTextChild = this.hoveringTextChild;
|
|
55074
55079
|
const { element: element2 } = getObjectCommands(this.editor, this.hoveringBlock, this.hoveringTextChild);
|
|
55075
55080
|
if (!element2) {
|
|
55076
55081
|
return new DOMRect();
|
|
@@ -95914,7 +95919,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95914
95919
|
}
|
|
95915
95920
|
}
|
|
95916
95921
|
});
|
|
95917
|
-
editor.version = "2.9.8-beta.
|
|
95922
|
+
editor.version = "2.9.8-beta.69";
|
|
95918
95923
|
return editor;
|
|
95919
95924
|
}
|
|
95920
95925
|
function isDoc(doc2) {
|
|
@@ -96048,7 +96053,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
96048
96053
|
OnesEditorDropTarget.register(editor);
|
|
96049
96054
|
OnesEditorTocProvider.register(editor);
|
|
96050
96055
|
OnesEditorExclusiveBlock.register(editor);
|
|
96051
|
-
editor.version = "2.9.8-beta.
|
|
96056
|
+
editor.version = "2.9.8-beta.69";
|
|
96052
96057
|
return editor;
|
|
96053
96058
|
}
|
|
96054
96059
|
async function showDocVersions(editor, options, serverUrl) {
|