Skip to content

Commit 27e4aa8

Browse files
authored
Update plugin.js
Added context menu support
1 parent ea29151 commit 27e4aa8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/plugin.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,18 @@
540540
onAction: startPlugin
541541
});
542542

543+
editor.ui.registry.addMenuItem('supercode', {
544+
icon: Config.iconName,
545+
text: 'Source Code',
546+
onAction: startPlugin
547+
});
548+
549+
editor.ui.registry.addContextMenu('supercode', {
550+
update: element => {
551+
return 'supercode';
552+
}
553+
});
554+
543555
// Ctrl + Space Toggle Shortcut
544556
if(Config.shortcut){
545557
editor.shortcuts.add('ctrl+32', 'Toggles Source Code Editing Mode', startPlugin);

0 commit comments

Comments
 (0)