Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

notepadqq-api

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notepadqq-api

Notepadqq API Layer for extensions

  • 0.9.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

notepadqq-api

API for Notepadqq extensions in Node.js

npm version

Install

npm install notepadqq-api

Getting started

// First, require the module
var NotepadqqApi = require("notepadqq-api").NotepadqqApi

// Connect to Notepadqq
NotepadqqApi.connect(function(api) {

    // Print the version of Notepadqq to the console
    console.log("Version " + api.notepadqq.version())

    // We initialize each window here
    api.onWindowInitialization(function(window) {

        // Add a new menu item
        var menu = window.addExtensionMenuItem(api.extensionId, "My menu")

        // Add an handler to the "triggered" event of the menu item: it
        // will be called when the user clicks on the menu.
        menu.on("triggered", function() {

            // Replace the selected text in the currently opened tab
            // with the string "Hello World"
            window.currentEditor().setSelectionsText(["Hello World"]);

        });

    });

});

Keywords

FAQs

Package last updated on 22 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc