How to prevent rich text from being deleted in textboxes?

I know how to filter out rich text to proccess it and apply rich text on keywords. But I don’t know how to prevent the client from deleting parts of the rich text which then breaks it, preventing the rich text to be filtered out in proccessing and preventing the rich text from actually functioning.

My program simplified does this:

input changedrich text applied to keywords (takes in .ContentText)proccessed text containing rich text applied to textbox

You can have TextBox and Textlabel the Textlabel act like the output and the textbox act like input so you make the text invisible in textbox and you copy the text and paste it in the textlabel and you have to make script whenever word is detected and it can be colored you can change the color on textlabel not on text box i learned that from script editer pluings.

I used that method before, it does not show the current letter the client is on, and my rich text also includes line breaks often, meaning both texts would still need to use line breaks