codemirror-mode-apex

1.1.0 • Public • Published

codemirror-mode-apex

A CodeMirror mode for Salesforce Apex development

Installation instructions

  • Install from NPM: npm install codemirror-mode-apex
  • Include the new mode into your project, e.g.
<script src="./node_modules/codemirror/lib/codemirror.js"></script>
<script src="./node_modules/codemirror-mode-apex/dist/apex.js"></script>
  • Set the mode to text/x-apex in your editor, e.g.
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
        mode: "text/x-apex"
      });

The index.html file in this project includes a simple example. Note that CodeMirror must be installed through NPM as a dependency of codemirror-mode-apex for that page to display correctly.

Package Sidebar

Install

npm i codemirror-mode-apex

Weekly Downloads

7

Version

1.1.0

License

MIT

Last publish

Collaborators

  • mauracwarner