diff --git a/src/main.ts b/src/main.ts index 68953d2..d425891 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,25 @@ -/** - * Make your Plugin here! - * GLHF! - */ +import { Menu, Notice, Plugin } from 'obsidian'; + +export default class CopyImageShortcut extends Plugin { + private clickImage = (event: MouseEvent) => { + console.log('click'); + } + + async onload() { + + this.addRibbonIcon('copy', 'Open menu', (event) => { + const menu = new Menu(); + + menu.addItem((item) => + item + .setTitle('Copy Image') + .setIcon('documents') + .onClick(() => { + new Notice('Copied'); + }) + ); + + menu.showAtMouseEvent(event); + }); + } +} \ No newline at end of file