I'm trying to use Lexical editor with react to implement a text editor "similar to the Grammarly concept" to send each typed word with its index on socket.
I need to know what is the best way to implement it considering if user change specific word at the middle of the sentence how I could detect its position?