react-native-rich-editor
react-native-rich-editor copied to clipboard
Editor focus not working.
Even though this reply is late, I am dropping this here. I assume you are trying to call focusContentEditor
method that does not work. I faced the same issue and it is indeed very weird and frustrating.
As weird as it sounds, the workaround I found was to dismiss the keyboard first, and then focus the editor like so:
RichText.current?.dismissKeyboard();
RichText.current?.focusContentEditor();
Another issue with this library is, if the editor is not focussed and you call insertText()
or insertHTML()
, they won't work. You have to make the editor focussed first, and then do your insert like below:
RichText.current?.dismissKeyboard();
RichText.current?.focusContentEditor();
RichText.current?.insertText('My message');
i have to try this