Last active
August 29, 2015 14:03
-
-
Save sbruchmann/8067bf5cdad840835347 to your computer and use it in GitHub Desktop.
Tutorial: Add a top-level menu entry at a specific position
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function () { | |
"use strict"; | |
var CommandManager = brackets.getModule("command/CommandManager"), | |
Commands = brackets.getModule("command/Commands"), | |
Menus = brackets.getModule("command/Menus"); | |
var MY_COMMAND_ID = "PDFEXPORT"; | |
function exportAsPDF() { | |
alert("Not implemented"); | |
} | |
CommandManager.register("Export as PDF", MY_COMMAND_ID, exportAsPDF); | |
Menus | |
.getMenu(Menus.AppMenuBar.FILE_MENU) | |
.addMenuItem( | |
MY_COMMAND_ID, // Command id | |
null, // Keybindings | |
Menus.AFTER, // Position | |
Commands.FILE_SAVE_AS // Relative Command id | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment