This bug has already been reported several times.
Will we ever see this feature rollover to the Roblox Chat? Or does it use it by default now? I was about to make a module that I want to use colored text in the StarterGui:SetCore("ChatMakeSystemMessage")
and remembered RichText was now live.
Any updates on when weāll be getting <br>?
I noticed you said you guys have it implemented but itās not released yet.
Iām working on a thing for syntax highlighting.
I have a TextBox that the user can type in and a TextLabel on top which mimics the TextBox except it adds color using RichText. The only problem is RichText likes to shorten multiple new lines into a single new line, so it throws everything off sync.
Other people seem to be running into a similar situation
It would be great if we could have <br> support, or support for multiple new lines in RichText
TLDR: Yet another request for <br>
Another solution I tried was using a special character with 0 width
local noWidthChar = "ā"
--- bla bla bla
TextLabel.Text = TextLabel.Text:gsub('\n','\n'..noWidthChar)
For some reason Roblox changes the 0 width character to some sort of obstructed character
no idea why
EDIT:
I donāt know why Roblox doesnāt like the no width character directly, but you can produce something very similar with this:
TextLabel.Text = TextLabel.Text:gsub('\n','\n'..utf8.nfcnormalize(""))
Itās not a perfect no-width character, but itās very close. Itās an invisible character with a width of 4 pixels.
I think itās supposed to be the same character, because all I did was format the character into utf8 to then format it back, but I donāt know enough about this to say for sure. Either way, with a little offset, I can make a haxy custom <br> functionality!
Iām just going to use this for the time being until an official <br> is released.
Are there limitations to RichText? Is it supposed to just stop working?
I donāt know if this is a bug or a known limitation but RichText seems to break after a certain number of tags.
If it is a limitation, itās not very well documented.
Thereās nothing about such a limitation anywhere in the api wiki, article, or this post.
So does anybody have a solution to TextScaled not working? I understand it has already been reported but Iāve read through the forum and I donāt see a way to fix this while we wait. I want to use this in a notification system and itās crucial that the text scales.
What about to set textās size by its frameās absolute Y size?
Hi, @CboatDev.
Yes, Iāve found a way around it. In order to have things scaling, add a UIScale and set the scale based on a screen resolution. For instance, use 1920x1080 to be your UIās target resolution and change the UIScaleās Scale property in order to have everything scaling properly depending on screen sizes. In fact, this solution is far beyond being RichText-only. It expands to multiple GuiObjects.
Best regards,
Octonions
Thanks for your help. Iām just going to hold off on using rich text until they figure this out. Why canāt they just disable TextScaled when you use font size tags?
I believe ROBLOX has to do more than that to make it fit for everyoneās use.
No text scaling is a dealbreaker for me. Any plans to add this?
Thanks for your patience! We are actively working on this and the timeline expectation would take around 2 weeks more.
We have internal size limitation on the text property on textobject. We are looking into bumping that one for better richtext support.
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.
Best regards,
Octonions
Thanks for your suggestions~ We actually have this feature implemented. We will release it sometime later.
Is the <img>
tag on the roadlist? I havenāt got any response to my last question.
Iām having the same problem did you found a fix?
Can we get RichText support for bubble chat? Iām developing a rich text system and this would help tons.
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.