0.12.0 • Published 10 months ago

codemirror-nsis v0.12.0

Weekly downloads
4
License
MIT
Repository
github
Last release
10 months ago

codemirror-nsis

npm npm CI

A mode for NSIS to use with CodeMirror, the versatile text editor implemented in JavaScript for the browser.

Demo Time 🙌

Installation

Use your preferred Node package manager to install the mode

$ yarn add codemirror-nsis || npm install codemirror-nsis

Alternatively, you can clone this repository

$ git clone https://github.com/idleberg/codemirror-nsis

Usage

Example usage on website

<!DOCTYPE html>
<html>
<head>
  <!-- Import CodeMirror styles -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/codemirror@5/lib/codemirror.min.css">
<head>
</head>
<body>
  <!-- Add Textarea -->
  <textarea id="editor"></textarea>

  <!-- Import CodeMirror library -->
  <script defer src="https://cdn.jsdelivr.net/npm/codemirror@5/lib/codemirror.min.js"></script>

  <!-- Import NSIS mode -->
  <script defer type="module" src="https://cdn.jsdelivr.net/npm/codemirror-nsis@latest/dist/codemirror-nsis.mjs"></script>

  <!-- Initialize CodeMirror -->
  <script type="text/javascript">
    const editor = document.getElementById('editor');
    const options = {
      lineNumbers: true,
      mode: 'nsis'
    };

    CodeMirror.fromTextArea(editor, options);
  </script>
</body>
</html>

Note: If you want to load CodeMirror from a CDN, make sure to specify a specific version for better performance – the example above doesn't to keep it simple.

License

Released under The MIT License

0.12.0

10 months ago

0.11.2

2 years ago

0.11.0

2 years ago

0.11.1

2 years ago

0.10.0

2 years ago

0.10.1

2 years ago

0.9.0

3 years ago

0.8.5

3 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago