# react-content-editable

> React Compenent for a div with 'contentEditable = true'

Latest version **1.0.1** (published 2016-05-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-content-editable
pnpm add react-content-editable
yarn add react-content-editable
bun add react-content-editable
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-05-31 |
| First published | 2016-05-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | picker |
| Maintainers | pickerlee |
| Keywords | react-compenent, contenteditable, react, textarea |

## Links

- npm: https://www.npmjs.com/package/react-content-editable
- Repository: https://github.com/li2274221/react-contenteditable
- Homepage: https://github.com/li2274221/react-contenteditable#readme
- Issues: https://github.com/li2274221/react-contenteditable/issues
- npm.io page: https://npm.io/package/react-content-editable

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-05-31
- 1.0.0 — 2016-05-31

## README

# react-contenteditable

React Compenent for a div with `contentEditable = "true"`


## Usage 

```javascript
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});
    },

    handleFocus: function(){
        // do something
    }

    handleBlur: function(){
        // do something
    }

    render: function(){
      return <ContentEditable
                html={this.state.html} // innerHTML of the editable div
                disabled={false}       // use true to disable edition
                onChange={this.handleChange} // handle innerHTML change
                onFocus={this.handleFocus}
                onBlur={this.handleBlur}
              />
    }
  });
```

## Structure of this repository
+ lib/ compiled javascript, usable directly in the browser
+ src/ source javascript. Uses JSX and ES6.

---
_Source: https://npm.io/package/react-content-editable · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
