Perhaps a feature such as a property named “Displayed text” under both textboxes and textlabels would fix the prevention of using richtext on input. it would greatly improve the feature usage on more than just bland non user generated texts.
this properly would basically be a read-only of the .Text property just without any html if richtext is enabled.
Until this is implemented (if ever) user generated content can be filtered from html with a simple line:
local NonHTML_Text = text:gsub("%b<>", "")
sadly this would take stuff like <hi I'm voided> in account so feel free to modify it to specific cases only
Indeed, @VoidedBlades.
I vouch for that as well.
I have been using something similar. Although your method seems faster and cleaner, I am going to post what I have been using as well.
local displayedText = string.gsub(text, "<.->", "")
Not sure if it works for all cases, but it has been working for me.
does the TextFits property work in richtext? i tried it with some code but it behaves incorrectly for me, but im not sure because it can be my code’s problem
You can do it easily for yourself, just start the game and under the chat service on explorer there are a lot of scripts, copy them stop the game paste them to somewhere and then explore it you will find some function that makes bubblechat’s eventually, then you can set the richtext property there to true.
Due to the request on one of my replies, I have opened a new thread in Community Resources with a way to scale UI elements properly, which includes RichText TextLabels as well.
Upcoming updates that is scheduled next week:
Hi developers, thanks for your feedbacks shared within this thread. We have been updating our algorithms used for rich text and will release some improvement as well as TextScaled support approximately next week. Along with this update, we will also fix several issues including wrapping against spaces, respecting the linebreaks at the beginning of the string, etc. (* Note that this would be the last release this year so any extra features that are requested will be taken care of but would get shipped around the beginning of next year.)
Again, thanks for your patience and it is so nice to see the features getting improved with all of you guys involved.
The LineHeight property doesn’t work unless a text box has rich text enabled, but rich text is disabled while the text box is being edited. For my use, this isn’t ideal…
I’d like to have LineHeight take effect regardless. Is there any chance we can get line height to work regardless of whether or not a rich text box is being edited?
Hello, today when i used textscaled on a richtext enabled textlabel it used the size that was calculated by textscaled one, is it me or did you guys add the textscaled support?