0.1.1 • Published 7 years ago
codemirror-mode-stata v0.1.1
codemirror-mode-stata
A CodeMirror mode for the Stata language
Installation
npm install codemirror codemirror-mode-stata --saveUsage
- Include - codemirror-mode-statainto 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