Using Rich Text
Using Rich Text
Applying rich text to an individual text object string is done via simple markup tags. Currently, you can specify the font size, color, bold, italics, underline, and strikethrough, with more options upcoming.
Enabling Rich Text
Rich text must be enabled on a per-object basis through its RichText property.
- Select the
TextBoxobject you wish to enter rich text into.
- Enable its RichText property in the Properties window or set it to
- Enter rich text markup inside its Text property according to the supported tags outlined below.
Tags are similar to XML/HTML tags and require both an opening and closing tag around the formatted text.
Tags can be nested inside each other as long as they are closed in the reverse order of how they’re opened.
* Font face names can be found in the Name column of the
Enum/Font reference page.
Some characters have “escape” forms when rich text is enabled. If you want to display these characters without rich text parsing them, use their escape forms.
||10 < 100|
||100 > 10|
||Meet "Diva Dragonslayer"|
||Diva's pet is a falcon!|
||Render another escape form < by escaping an ampersand.|
When a user-editable
TextBox/RichText|RichText enabled and the text box gains focus, the user will be able to edit and interact with the complete XML string, including all of the formatting tags. When focus is lost, the text will automatically parse and render the tags as rich text.
Currently, when you
articles/Introduction to Localization on Roblox|localize a game to support other languages, formatting tags will be removed. To make formatting appear in other languages, you’ll need to re-apply the tags manually to your localized strings.