Textmeshpro: "rich Text" Vs "allow Rich Text Editing"?

What is the difference between these two? I couldn’t find a doc link, especially about the 2nd “Allow Rich Text Editing” opt.

Let’s say, for example, I want rich text to work programatically but I don’t want the user to input their OWN rich text: Where backspace would delete the WORD and not reveal the tag. What options should I use?

1 Like

Rich Text disables all input of Rich Text where typing something like would result in the text in the input field showing .

Allow Rich Text Editing allows rich text to be typed and contained in the text but not the removal of hidden rich text.

Example: A user could type “A simple example.” where the word simple would be bold. The cursor could be placed before the letter e of example and then using backspace, would end up deleting the word simple but the bold tags would remain.

When Allow Rich Text Editing is enabled, moving the cursor left to right, will result in the cursor stepping through the rich text hidden in the text. This would make the cursor appear to get stuck on some characters as it is stepping through the rich text underneath.

Is there a way to unhide the rich text for editing already built into TMP or do I need to make my own solution? Like wrapping the input in tags when a hypothetical “Edit” button is pressed for example.

2 Likes

I’m curious if a Unity mobile runtime richtext text editor asset has been made yet