Code Monkey home page Code Monkey logo

codiad-plugin-template's Introduction

Codiad Plugin Template

This is a base for building plugins for Codiad IDE. There are 3 main components:

  • init.js which initializes your plugin into the system
  • plugin.json which is what Codiad uses to identify your plugin
  • README.md which should contain information for the end-user

You can add CSS files, images, other libraries, etc. as needed for the plugin to operate successfully.

Since you have access to the global.codiad object you can also utilize other components in the system to modify the editor, work with projects, run searches, etc.

For a style guide and icon listing view the /style_guide.php file in the root of your Codiad install instance.

Explanation of plugin.json

The plugin.json file describes how the plugin will interact with Codiad. Most of the properties are self explanatory.

[{
    "author": "Your Name",
    "version": "Your Version",
    "name": "Your Plugin Name",
    "rightbar": [
        {
            "action": "codiad.MY_PLUGIN.SOME_METHOD();",
            "icon": "icon-NAME",
            "title": "This will be displayed in the rightbar"
        }
    ],
    "contextmenu": [
        {
            "action": "codiad.MY_PLUGIN.SOME_METHOD();",
            "icon": "icon-NAME",
            "applies-to": "both",
            "title": "This will be displayed in the contextmenu"
        }
    ]
}]

author, version and name are the core info, describing the plugin.

rightbar is used if you want the plugin to appear in the right-hand bar. The action parameter should call a method in the init.js file.

contextmenu is similar format to rightbar but gives the ability to add context menu items to the file manager. The applies-to property specifies whether the menu entry will appear for directory(s) file(s) or both.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.