Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ease startup #69

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ npm install react-codemirror --save

## Usage

Require the Codemirror component render it with JSX:
```javascript
var React = require('react');
var Codemirror = require('react-codemirror');
Expand All @@ -56,6 +57,11 @@ var App = React.createClass({
React.render(<App />, document.getElementById('app'));
```

Add the Codemirror CSS to your styles (easy to do with a LESS import):
```less
@import (inline) "../../node_modules/codemirror/lib/codemirror.css";
```

### Methods

* `focus` focuses the CodeMirror instance
Expand Down Expand Up @@ -97,6 +103,6 @@ require('codemirror/mode/markdown/markdown');

See the [example source](https://github.com/JedWatson/react-codemirror/blob/master/example/src/example.js) for a reference implementation including JavaScript and markdown syntax highlighting.

### License
## License

MIT. Copyright (c) 2016 Jed Watson.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"lodash.debounce": "^4.0.8"
},
"devDependencies": {
"browserify-optional": "^1.0.0",
"gulp": "^3.9.1",
"happiness": "^7.1.2",
"react": "^15.3.1",
Expand Down