2

I want to use a span as a simple text input. If I weren't using React, I'd just do this the normal way with content-editable. However, this doesn't work nicely with React.

I know that Draft.js and the NPM package react-contenteditable both handle some of these complexities for React. But those sort of seem like overkill for this, because I don't want the input to be able to handle anything except plain text.

Should I just use Draft.js or react-contenteditable, or can I do something simpler?

Buck Shlegeris
  • 517
  • 6
  • 22

1 Answers1

2

Upon further consideration, react-contenteditable seems to be the best solution for this. It's actually pretty lightweight and quite customizable. Also, the source code is short enough and simple enough that I was able to just read the whole thing.

Buck Shlegeris
  • 517
  • 6
  • 22