I'm creating a note taking app on React Native, and at the moment the text editor is an enhanced TextInput with some extra functionalities like copying, pasting, inserting dates, etc.

The problem is that this is very limited as I can't add line numbers, nor change styles, coloring text, etc. Performance is also a concern for big documents.

I'm experimenting with splitting the text into lines and create one text input per line, but some problems appear: I can't select text across lines, I have to handle individual keystrokes to catch line breaks, the cursor won't move between text inputs, etc.

Another problem is that I can catch soft keyboard events, but no physical keyboard events, as per the `onKeyPress` documentation.

I wonder whether there is a good solution for this as it seems right now that using TextInputs won't allow me to do what I need.

A good answer would be either a good library, or directions on how to do this by hand, directly using components and catching keyboard events (assuming that this is even possible).

For clarification, I don't want a rich text editor library, I want the tools to build it. I also don't want to use a webview.