react-native-rich-editor icon indicating copy to clipboard operation
react-native-rich-editor copied to clipboard

Editor focus not working.

Open EphraimTMadondo opened this issue 3 years ago • 2 comments

EphraimTMadondo avatar Mar 30 '21 12:03 EphraimTMadondo

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');

BadhanGanesh-HappyFox avatar Jul 18 '22 08:07 BadhanGanesh-HappyFox

i have to try this

muaaz9329 avatar Jul 11 '23 03:07 muaaz9329