https://github.com/alincode/codemirror-solidity
https://github.com/alincode/codemirror-solidity
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/alincode/codemirror-solidity
- Owner: alincode
- Created: 2019-05-24T14:31:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-21T14:39:37.000Z (over 3 years ago)
- Last Synced: 2024-10-27T22:47:38.086Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 180 KB
- Stars: 8
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# codemirror solidity mode
* [simple demo](https://alincode.github.io/codemirror-solidity/)
* [carbon demo](https://carbon.now.sh/kN5PIVd3SAzGLtrfiyyb)
A CodeMirror mode for Ethereum Solidity development


[](https://david-dm.org/alincode/codemirror-solidity)

## what is CodeMirror?
*
* 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.
## Installation instructions
+ Install from NPM: `npm install codemirror-solidity`
+ Include the new mode into your project, e.g.
```
```
+ Set the mode to `text/x-solidity` 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.
## License
MIT © [alincode](https://github.com/alincode/codemirror-solidity)