Socket
Book a DemoInstallSign in
Socket

codemirror-nsis

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codemirror-nsis

NSIS mode for CodeMirror 5

latest
Source
npmnpm
Version
0.12.0
Version published
Maintainers
1
Created
Source

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

Keywords

codemirror

FAQs

Package last updated on 02 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts