Need help with highlighting & underlining specific texts in a paragraph

I have a functionality of Correction in bubble.io app where a user clicks a button & we have a file with multiple sentences being sentences as list of sentences inside the file.

When the button is clicked, We want to highlight the mistakes of grammer & spellings etc to be highlighted in pink underline color.

How can we achieve this? I am currently using text format for showing the text & also rich text editor.

Further when a certain specific word (The mistake) is clicked, we need to show the popup with suggested words for the mistaken word and when a word is selected, we need to update (find & replace) so that the mistake is corrected.
Same process to be applied and repeated for all mistakes

Help me achieve this functionality

Screenshots are attached: