Skip to content

synergence/rich-text-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@rbxts/rich-text-stream

A way to build Roblox rich text without the clutter.

import rich from '@rbxts/rich-text-stream';

// Create rich text

const output = rich()
    .add('Hello, ')
        .bold()
        .fontColor('#ff0000')
        .fontSize(20)
    .add('world!')
        .italics();

// To output

print(output); // <font color="#ff0000" size="20"><b>Hello, </b></font><i>world!</i>

// Or, if the function only accepts strings

print(tostring(output));
print(output.toString());

The API is self-documenting, they're named after the Roblox tags.

For convenience, there are multiple ways to format the font color - use whichever is most convenient for you.

There is also a shorthand method for convenience:

rich('Hello!')
    .bold()
    .italics();

About

A way to build Roblox rich text without the clutter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published