Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alincode/codemirror-solidity
https://github.com/alincode/codemirror-solidity
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/alincode/codemirror-solidity
- Owner: alincode
- Created: 2019-05-24T14:31:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-21T14:39:37.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T22:47:38.086Z (2 months 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
![GitHub package version](https://img.shields.io/github/package-json/v/alincode/codemirror-solidity.svg)
![npm downloads](https://img.shields.io/npm/dt/codemirror-solidity.svg)
[![Dependency Status](https://img.shields.io/david/alincode/codemirror-solidity.svg?style=flat)](https://david-dm.org/alincode/codemirror-solidity)![](demo.png)
## 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)