edit

1.0.2 • Public • Published

edit

wraps codemirror into a high-level API that you can require() and insert into a page as a standlone editor, easily.

the codemirror stylesheet will automatically get inserted into the page for you when you create a new edit instance.

installation

npm install edit --save

now you can require('edit') and use it in the browser with browserify

usage

this will create a codemirror editor and append it to document.body:

var edit = require('edit')
edit()

you can also pass in codemirror options, including a container option which is where the editor will get appended into:

var edit = require('edit')
var editor = edit({
  container: document.querySelector('.editor'),
  tabSize: 16
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    60
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    60
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i edit

Weekly Downloads

45

Version

1.0.2

License

BSD

Last publish

Collaborators

  • maxogden