Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robbestad/react-editable-div
React Component that enables editable divs
https://github.com/robbestad/react-editable-div
Last synced: 20 days ago
JSON representation
React Component that enables editable divs
- Host: GitHub
- URL: https://github.com/robbestad/react-editable-div
- Owner: robbestad
- License: isc
- Created: 2015-01-12T12:19:17.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T12:42:16.000Z (over 7 years ago)
- Last Synced: 2024-11-17T04:52:23.060Z (about 1 month ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Editable DIV
[React][1] Component that enables editable divs.
Source on [github][3]
## Installation
% npm install react-editable-div --save
## Usage
Optionally send in 'editable' as true/false in cause you want
to only want to set editable for certain users.In the 'onChange' function, set up any method
you want to store the new value.#### Example
var Editable = require('react-editable-div');
MyComponent = React.createClass({
onChange: function (e) {
// Use either
//console.log(e.target.value);
// or:
//console.log(this.refs.editable.getDOMNode().innerHTML);
},render: function() {
return (
);
}
});[1]: https://facebook.github.io/react
[2]: https://github.com/svenanders/react-editable-div/issues/1
[3]: https://github.com/svenanders/react-editable-div