codemirror solidity mode
A CodeMirror mode for Ethereum Solidity development
!GitHub package version
!npm downloads


*
* CodeMirror is a versatile text editor implemented in JavaScript for the browser. It is specialized for editing code, and comes with a number of language modes and addons that implement more advanced editing functionality.
+ Install from NPM: npm install codemirror-solidity
+ Include the new mode into your project, e.g.
```text/x-solidity
+ Set the mode to in your editor, e.g.
`js`
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
theme: "solidity",
matchBrackets: true,
indentUnit: 4,
lineNumbers: true,
tabSize: 8,
indentWithTabs: true,
mode: "text/x-solidity"
});
The index.html` file in this project includes a simple example. Note that CodeMirror must be installed through NPM as a dependency of codemirror-solidity for that page to display correctly.