Open tasn opened 3 years ago
I've been working on this the past few weeks and here are my findings:
There doesn't seem to be a well-known and well-maintained package.
There are nice candidates with good looking UIs that work well on web: tui.editor (includes a WYSIWYG, a syntax highlighted markdown editor and a viewer), QuillJS, CKEditor, DraftJS… They all seem to have some issues with Chrome Mobile and/or GBoard and it's autocorrect: the view jumps when the cursor moves, impossible to add new lines after wrong words according to autocorrect, strange cursor jumping or text editing when pressing enter… It's also valid for syntax highlighting editors it seems
Build our own editor that uses a multiline TextInput
and styles the text with Text
components (View
s are not supported).
Just integrating a toolbar should be easy enough.
Unless someone can think of something else of course…
The issues you describe all sound related to using managed react components rather than non-managed. Are you using managed (so the content
and setContent
), or you using not managed (getting the content only upon request)? I bet that if you try not using the content
and setContent
, all of a sudden everything will magically work.
I never came to the part where I managed them actually. Those are all issues I have in Chrome Android when I visit the demo pages of the editors, and that remained when I tried to bundle some of them in a WebView.
Oh wow, that's terrible. :|
They all seem to have some issues with Chrome Mobile and/or GBoard and it's autocorrect:
I would like to point out Prosemirror does fairly well with autocorrect and mobile support. If you are interested you can give https://github.com/bangle-io/bangle.dev a try. It is a library I wrote on top of Prosemirror to make it easier to get started with.
This may be a different take than a rich text editor but IMO even preferable. Tasks.org uses Markwon: https://noties.io/Markwon/docs/v4/editor/#getting-started-with-editor
Unlike tasks.org, we need a cross-platform solution that works with react native (not sure, maybe the link satisfies that, haven't checked).
Probably want to use something like https://github.com/ianstormtaylor/slate We want markdown syntax highlighting and a toolbar