codemirror-mode-stata
v0.1.1
Published
A CodeMirror mode for the Stata language
Downloads
7
Readme
codemirror-mode-stata
A CodeMirror mode for the Stata language
Installation
npm install codemirror codemirror-mode-stata --save
Usage
Include
codemirror-mode-stata
into your project.<!-- You can simply add stata.js as a script tag: --> <script src="js/codemirror.js"></script> <script src="js/codemirror-mode-stata/dist/stata.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 registerStataMode from 'codemirror-mode-stata'
Set 'stata' as the mode when creating the CodeMirror editor.
CodeMirror.fromTextArea(document.getElementById('code'), { mode: 'stata' })
License
MIT - See LICENSE