mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-28 20:38:49 +01:00
This commit is contained in:
parent
dce9d4da54
commit
846fdf7c6e
6 changed files with 130 additions and 48 deletions
|
|
@ -5,6 +5,7 @@ import {openEditorTab} from "../../../menus/util";
|
|||
import {copySubMenu} from "../../../menus/commonMenuItem";
|
||||
import {popTextCell, showHeaderCellMenu} from "./cell";
|
||||
import {getColIconByType} from "./col";
|
||||
import {emitOpenMenu} from "../../../plugin/EventBus";
|
||||
|
||||
export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLElement }) => {
|
||||
const blockElement = hasClosestBlock(event.target);
|
||||
|
|
@ -143,6 +144,17 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a
|
|||
type: "submenu",
|
||||
submenu: editAttrSubmenu
|
||||
});
|
||||
if (protyle?.app?.plugins) {
|
||||
emitOpenMenu({
|
||||
plugins: protyle.app.plugins,
|
||||
type: "open-menu-av",
|
||||
detail: {
|
||||
protyle,
|
||||
element: hasClosestByClassName(target, "av__cell"),
|
||||
},
|
||||
separatorPosition: "top",
|
||||
});
|
||||
}
|
||||
menu.open({
|
||||
x: event.clientX,
|
||||
y: event.clientY,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue