Skip to content

CraftTweaker/codemirror-mode-zenscript

Repository files navigation

codemirror-mode-zenscript

npm version dependencies Status

A CodeMirror mode for ZenScript

Installation

npm install codemirror codemirror-mode-zenscript --save

Usage

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

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

    or

    // If using a build pipeline like webpack, you can simply import the module.
    // The mode is registered automatically when importing. See below:
    import CodeMirror from 'codemirror';
    import registerZenScriptMode from 'codemirror-mode-zenscript';
  2. Set zenscript as the mode when creating the CodeMirror editor.

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

About

A CodeMirror mode for the ZenScript language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published