Search code examples
adobe-brackets

Add side button in Brackets extension


I'm developing Brackets extension and want to add side button. What module can do that?

Brackets sidebar


Solution

  • Short answer: There is no module or API for it, you have to do it yourself.

    Helpful answer: You can use this snipped to add a Button to the toolbar:

    $toolbarButton = $(document.createElement("a"))
        .attr("id", "phanect-extensionname-toolbar-icon")
        .attr("href", "#")
        .attr("title", Strings.TOOLBAR_ICON_TOOLTIP)
        .on("click", function () {
            // Handle click
        })
        .appendTo($("#main-toolbar .buttons"));
    

    For the icon of the Button and the css see Extension Icon Guidelines