https://github.com/allnulled/live-editor-boilerplate
Live editor web application boilerplate. Create online editors fastly.
https://github.com/allnulled/live-editor-boilerplate
Last synced: about 1 year ago
JSON representation
Live editor web application boilerplate. Create online editors fastly.
- Host: GitHub
- URL: https://github.com/allnulled/live-editor-boilerplate
- Owner: allnulled
- Created: 2020-05-05T14:30:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-06T15:59:36.000Z (about 6 years ago)
- Last Synced: 2025-04-12T06:39:06.341Z (about 1 year ago)
- Language: JavaScript
- Size: 271 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# live-editor-boilerplate
Customizable live web editor for a specific language.
## Why
Parser generator tools like [PEGjs](https://github.com/pegjs/pegjs) provide enough details of the `SyntaxError`s arised by the action of parsing, that one can provide suggestions at runtime with the adecuate editor. This project is for you to take advantage of this fact, automatically.
## Install
```sh
$ git clone https://github.com/allnulled/live-editor-boilerplate.git .
```
## Customize
In order to customize your own application, you have to alter these files:
- **File:** `lib/yourlanguage.parser.pegjs`. Contains the source of a [PEGjs syntax](https://github.com/pegjs/pegjs). (It is not used in the application, so you can ignore it).
- **File:** `lib/yourlanguage.parser.js`. Contains the parser function.
- **File:** `lib/codemirror.mode-yourlanguage.js`. Contains the styles tokenization of your grammar.
- **File:** `lib/codemirror.mode-yourlanguage.css`. Contains the styles of your grammar tokens.
- **File:** `lib/index.js`. Contains the events of the editor.
- **File:** `index.html`. Contains the editor application entry point.
- **Lines:**
- `6`: ``
- `12`: ``
- `13`: ``
- `17`: `Your Language`
- `22`: ``
- `23`: `
yourlanguage`
- `26`: ``
## Run
As this application is client-side only, you can use any type of server to host it.
## Notes
The project is released with a working example for the [`contratos`](https://github.com/allnulled/contratos) language, for you to see how it works already.
## License
This project is released under [**WTFPL** or *What The Fuck Public License*](https://es.wikipedia.org/wiki/WTFPL), which means *do what you want with it*.
## Issues
If you find any issue, please, let me know through [this form](https://github.com/allnulled/live-editor-boilerplate/issues).