mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 22:25:29 +01:00
13 lines
507 B
TypeScript
13 lines
507 B
TypeScript
import {getEventName} from "../util/compatibility";
|
|
import {ToolbarItem} from "./ToolbarItem";
|
|
export class BlockRef extends ToolbarItem {
|
|
public element: HTMLElement;
|
|
|
|
constructor(protyle: IProtyle, menuItem: IMenuItem) {
|
|
super(protyle, menuItem);
|
|
this.element.addEventListener(getEventName(), (event: MouseEvent & { changedTouches: MouseEvent[] }) => {
|
|
protyle.toolbar.setInlineMark(protyle, "blockRef", "add");
|
|
event.stopPropagation();
|
|
});
|
|
}
|
|
}
|