0.2.5 • Published 9 years ago

d-codemirror v0.2.5

Weekly downloads
9
License
MIT
Repository
github
Last release
9 years ago

d-codemirror

Example CodeMirror Derby component.

Usage

Example usage

In your template

<Head:>
  <view name="d-codemirror:includes" static="/cm"></view>
<Body:>
  <view name="d-codemirror" text={{_page.text}} options="{{ { tabSize: 2 } }}"></view>

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 repo for an example using real-time data subscriptions to power multi-player editing.

0.2.5

9 years ago

0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.0

9 years ago

0.1.0

10 years ago