Nomadic People Migration
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    hudkit-code-editorpublic

    hudkit-ace-editor

    A code editor widget for hudkit, based on ACE.

    Installation

    hudkit-ace-editor lists hudkit as a peerDependency, so:

    $ npm install hudkit
    $ npm install hudkit-ace-editor
    $ cp -R node_modules/hudkit-ace-editor/ace-editor $ASSETS
    

    Substitute $ASSETS with the directory from which your assets are served. Your HTML needs to include something like this:

    <script src='$ASSETS/ace-editor/ace.js'></script>

    Initialisation

    Assuming a browserify workflow, you can initialise the editor like this:

    var hudkit = require('hudkit');
     
    // requiring the module will automatically register it with hudkit
    require('hudkit-ace-editor');
     
    window.init = function() {
        var hk = hudkit.instance(window);
        var codeEditor = hk.aceEditor();
        hk.root.setRootWidget(codeEditor);
    }

    See demo/index.htm, demo/main.js and the Makefile for a concrete build example.

    install

    npm i hudkit-code-editor

    Downloadsweekly downloads

    4

    version

    0.0.3

    license

    ISC

    repository

    githubgithub

    last publish

    collaborators

    • avatar