pascalw / codemirror-mode-elixir

A CodeMirror mode for the Elixir language

Home Page:https://codemirror-mode-elixir.optick.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

codemirror-mode-elixir

A CodeMirror mode for the Elixir language

Usage instructions

  1. Install codemirror-mode elixir from NPM: npm install codemirror-mode-elixir

  2. Include codemirror-mode-elixir into your project.

<!-- You can simply add elixir.js as a script tag: -->
<script src="js/codemirror.js"></script>
<script src="js/codemirror-mode-elixir/dist/elixir.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 registerElixirMode from 'codemirror-mode-elixir'
  1. Set 'elixir' as the mode when creating the CodeMirror editor.
CodeMirror.fromTextArea(document.getElementById('code'), { mode: 'elixir' })

About

A CodeMirror mode for the Elixir language

https://codemirror-mode-elixir.optick.io

License:MIT License


Languages

Language:JavaScript 79.0%Language:Vue 18.0%Language:HTML 3.0%