mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 02:21:38 +08:00
This commit is contained in:
parent
7f6de4a445
commit
f64c3439f4
@ -275,7 +275,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
|
|||||||
export const contentMenu = (protyle: IProtyle, nodeElement: Element) => {
|
export const contentMenu = (protyle: IProtyle, nodeElement: Element) => {
|
||||||
const range = getEditorRange(nodeElement);
|
const range = getEditorRange(nodeElement);
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
if (range.toString() !== "") {
|
if (range.toString() !== "" || (range.cloneContents().childNodes[0] as HTMLElement)?.classList.contains("emoji")) {
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
icon: "iconCopy",
|
icon: "iconCopy",
|
||||||
accelerator: "⌘C",
|
accelerator: "⌘C",
|
||||||
|
@ -1411,7 +1411,7 @@ export class WYSIWYG {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.element.addEventListener("dblclick", (event: MouseEvent & { target: HTMLElement }) => {
|
this.element.addEventListener("dblclick", (event: MouseEvent & { target: HTMLElement }) => {
|
||||||
if (event.target.tagName === "IMG") {
|
if (event.target.tagName === "IMG" && !event.target.classList.contains("emoji")) {
|
||||||
previewImage((event.target as HTMLImageElement).src, protyle.block.rootID);
|
previewImage((event.target as HTMLImageElement).src, protyle.block.rootID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user