Skip to content

Instantly share code, notes, and snippets.

@laynor
Created Nov 21, 2017
Embed
What would you like to do?
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