Skip to content

Instantly share code, notes, and snippets.

@laynor
Created November 21, 2017 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laynor/3eb041f4c69f021b0952512cb4ecf576 to your computer and use it in GitHub Desktop.
Save laynor/3eb041f4c69f021b0952512cb4ecf576 to your computer and use it in GitHub Desktop.
class PlainText extends React.Component {
state = {
value: Plain.deserialize('This is editable plain text, just like a <textarea>!')
}
onChange = ({ value }) => {
this.setState({ value });
}
render() {
return (
<div className="editor">
<Editor
placeholder="Enter some plain text..."
value={this.state.value}
onChange={this.onChange}
/>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment