HyperText is an advanced rich text module which allows you to render text, which can be styled and manipulated using markup tags, in any GuiObject. It’s designed for customization and versatility, hence the big API for something this simple. Though I did try to make it as user friendly as possible. You can find it’s API in the module itself.
Any feedback is super appreciated
Features
Altering text with markup tags: <size=40>Hi</size>, <color=red>apple</color>
A broad possibility for customization through attributes: <anim=wiggle dur=5 freq=10>, <img=1234567890 aspectratio=10 color=75,0,0>
Adding inline images
Adding effects to text, such as a shaking, shiny, foggy, or a rainbow effect, with more to come
Aligning the text horizontally (left, center, right) and vertically (top, center, bottom)
Adding fonts by asset ID
Adding a typewriter effect and typewriter sound effect
Full control over the rendering process. Pausing, resuming, etc
Pre-rendering text (for more info check the module’s API)
And quite some more…
Demonstration
(included in the module)
Basic Usage
Setting things up is pretty easy, first of all, you can optionally define the default markup and attributes you want any rendered text to have when there’s no external markup applied to it.
Now you can create a HyperText object by calling the constructor, you must give it the GuiObject in which you want to render any text and optionally the markup and attributes you defined earlier.
local container = script.Parent
local obj = HyperText.new(container, markup, attrs)
Once you’ve made the object, you can render any given text containing markup.
local text = "Today I crashed into a <fog=true color=75,0,0>garbage truck</fog>."
.. "<br=1><wait=2><anim=wiggle freq=2 loop=true>The driver was not happy.</anim>"
obj:Render(text)
Dude. Thank you so much for making this! I’ve been in search for a rich text module that supported characters instead of just text, most of them were broken or had some very interesting bugs, but yours definetly saved the day! This is an AWESOME module and I hope to see more updates to this masterpiece!!
Hi! This module is extremely well done and saves a lot of development time, great work.
While testing it, I ran into a small usability issue that I wanted to share. I spent around 15+ minutes trying to understand why nothing was rendering, even though the setup was correct. The root cause turned out to be a ZIndex issue: the text was rendering, but behind other UI elements.
On my side, I made a small adjustment that resolves this by deriving the effective ZIndex from the container, ensuring the rendered text appears as expected.
If anyone runs into the same issue, I’m happy to share the updated version.
Changes in the updated version
RichText.newProperties() now includes a ZIndexOffset property.
When not provided, it defaults to 1 (Roblox’s default ZIndex).
RichText.newProperties() now includes an EffectZIndexOffset property.
When not provided, it also defaults to 1.
The file below does not include the original “DEMO” subfolder.. RichText.rbxm (24.0 KB)
Really good, tried using Text+, but the character spacing was always super off compared to the font I wanted to use, this module I guess you automatically do the spacing yourself and its identical to the original font.
Added Stroke and some other capabilities to it myself, but those things are really easy and I’m sure will be included in the next update
do you mean .newMarkup() and .newAttributes()?
If so my intention was to make their types similar to the actual tags and values to avoid any confusion further on
as for the tags and values inside a render’s text the capitalization doesn’t matter, so emitimg, EmitImg, or EMITIMG would all work