So one of the things to come out of React.js Conf was Facebook announcing it had released Draft.js to the community. I know a lot of people were underwhelmed because there wasn’t much announced and this seems pretty minor, but I’m perfectly content with the announcement. I will personally say that the demo on the homepage is extremely underwhelming, but it’s actually a really useful component. I can’t tell you how many times I’ve started a project and add a textarea and think to myself “it would be so nice if this was actually a rich text editor instead of just plain text“. I really like the fact that all you need in the following to add a rich text editor:
render() { const {editorState} = this.state; return <Editor editorState={editorState} onChange={this.onChange} />; }
I’ll definitely play around with Draft.js and include it in one of my projects to see what it can do. At the very least, it will make my boring textarea boxes feel more interactive.