react-simple-contenteditable
A simple contenteditable component
Why?
ContentEditable has some known issues, the purpose of this component is to avoid some of its problems:
- Enable "plaintext-only" for most browsers;
- Prevent cursor jumping to the beginning of the field;
Example
import React Component from 'react';import ContentEditable from 'react-simple-contenteditable'; { ; thisstate = title: "Title here" thishandleChange = thishandleChange; } { this } { return <div ="App"> <ContentEditable = ="my-class" ="h1" = ="plaintext-only" /> </div> ; }
License
Copyright (c) 2018 Raphael Cavalcanti, contributors.
Released under the MIT license.
Screenshots are CC BY-SA (Attribution-ShareAlike).