JSPM

  • Created
  • Published
  • Downloads 179748
  • Score
    100M100P100Q161385F
  • License Apache

React component representing a <div> with editable contents

Package Exports

  • react-contenteditable

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-contenteditable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-contenteditable

React component for a div with editable contents

Usage

  var ContentEditable = require("react-contenteditable");
  var MyComponent = React.createClass({
    getInitialState: function(){
      return {html: "<b>Hello <i>World</i></b>"};
    },

    handleChange: function(evt){
      this.setState({html: evt.target.value});
    },

    render: function(){
      return <ContentEditable html={this.state.html} onChange={this.handleChange}/>
    }
  });