Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/undercloud/edito
Web-based code editor
https://github.com/undercloud/edito
code-editor edito highlight-js hightlight syntax-highlighting
Last synced: about 1 month ago
JSON representation
Web-based code editor
- Host: GitHub
- URL: https://github.com/undercloud/edito
- Owner: undercloud
- License: mit
- Created: 2017-12-14T13:45:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-02T16:13:42.000Z (almost 6 years ago)
- Last Synced: 2024-11-12T21:19:51.131Z (about 2 months ago)
- Topics: code-editor, edito, highlight-js, hightlight, syntax-highlighting
- Language: JavaScript
- Homepage:
- Size: 206 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Edito
Web-based code editor![Alt text](https://github.com/undercloud/edito/blob/master/promo.png?raw=true)
## Installation
`npm install edito`## Usage
```js
var jse = new Edito({
mount: '#js-editor',
syntax: 'js'
})
```
See `sandbox/index.html` for example## Options
* mount - (string) dom selector
* syntax - (string) e.g. 'js'
* spellcheck - (boolean) default false
* tabSize - (integer) tab size, default 4
* usingSpaces - (boolean) using spaces instead of tabs, default false
* theme - (string) set to 'dark', if need dark theme## Methods
* gotoLine(line) - move cursor to selected line
* highlightErrorLine(line) - set error code line
* clearErrorLine() - unset error highlight
* setValue(value) - set editor value
* getValue() - get editor value
* readonly(flag) - set read only mode
* getEditor() - get dom editor