1.0.0 • Published 2 years ago

codemirror-mode-ink v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

codemirror-mode-ink

A CodeMirror mode for the Ink language

Installation

npm install codemirror codemirror-mode-ink --save

Usage

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

    <!-- You can simply add ink.js as a script tag: -->
    <script src="js/codemirror.js"></script>
    <script src="js/codemirror-mode-ink/dist/ink.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 registerInkMode from 'codemirror-mode-ink'
  2. Set 'ink' as the mode when creating the CodeMirror editor.

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

License

MIT - See LICENSE

1.0.0

2 years ago