codemirror-mode-stata

0.1.1 • Public • Published

codemirror-mode-stata

A CodeMirror mode for the Stata language

Installation

npm install codemirror codemirror-mode-stata --save

Usage

  1. Include codemirror-mode-stata into your project.

    <!-- You can simply add stata.js as a script tag: -->
    <script src="js/codemirror.js"></script>
    <script src="js/codemirror-mode-stata/dist/stata.js"></script>

    or

    // If you're using frontend build tools like Webpack and Babel,
    // you can simply import the module and register the mode:
    import CodeMirror from 'codemirror'
    import registerStataMode from 'codemirror-mode-stata'
  2. Set 'stata' as the mode when creating the CodeMirror editor.

    CodeMirror.fromTextArea(document.getElementById('code'), { mode: 'stata' })

License

MIT - See LICENSE

/codemirror-mode-stata/

    Package Sidebar

    Install

    npm i codemirror-mode-stata

    Weekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    199 kB

    Total Files

    10

    Last publish

    Collaborators

    • kylebarron