diff options
author | Mark Powers <mark@marks.kitchen> | 2025-07-04 12:03:11 -0500 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2025-07-04 12:03:11 -0500 |
commit | 13feb30f3ff9b913670a5fe7c8a9c1907d2c1740 (patch) | |
tree | ab6c820b4904ee7b05cb284af87ea2afc680d628 /api/JoplinViewsMenus.d.ts |
Initial commitmain
Diffstat (limited to 'api/JoplinViewsMenus.d.ts')
-rw-r--r-- | api/JoplinViewsMenus.d.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/api/JoplinViewsMenus.d.ts b/api/JoplinViewsMenus.d.ts new file mode 100644 index 0000000..474830d --- /dev/null +++ b/api/JoplinViewsMenus.d.ts @@ -0,0 +1,20 @@ +import { MenuItem, MenuItemLocation } from './types'; +import Plugin from '../Plugin'; +/** + * Allows creating menus. + * + * [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/menu) + * + * <span class="platform-desktop">desktop</span> + */ +export default class JoplinViewsMenus { + private store; + private plugin; + constructor(plugin: Plugin, store: any); + private registerCommandAccelerators; + /** + * Creates a new menu from the provided menu items and place it at the given location. As of now, it is only possible to place the + * menu as a sub-menu of the application build-in menus. + */ + create(id: string, label: string, menuItems: MenuItem[], location?: MenuItemLocation): Promise<void>; +} |