Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derbyjs/d-codemirror
derby component for live-bound CodeMirror
https://github.com/derbyjs/d-codemirror
Last synced: about 1 month ago
JSON representation
derby component for live-bound CodeMirror
- Host: GitHub
- URL: https://github.com/derbyjs/d-codemirror
- Owner: derbyjs
- Created: 2014-04-27T00:23:03.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-07-07T18:35:40.000Z (over 6 years ago)
- Last Synced: 2024-08-03T19:08:41.759Z (4 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 4
- Watchers: 10
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-derby - d-codemirror - Derby component for live-bound CodeMirror (Components)
README
d-codemirror
==================Example CodeMirror Derby component.
# Usage
[Example usage](http://github.com/derbyjs/derby-examples/tree/master/codemirror)## In your template
```
```## Your data
```
model.set("_page.text", "Hello World");
```## Your CodeMirror
You can serve the CodeMirror files from your public folder. If you install them through NPM
you will have to add an extra static route to your Express app:````
var expressApp = express()
(…)
.use('/cm', serveStatic(process.cwd() + '/node_modules/d-codemirror/node_modules/codemirror/'))
(…)
````See the [derby-examples](http://github.com/derbyjs/derby-examples/tree/master/codemirror)
repo for an example using real-time data subscriptions to power multi-player editing.