2.1.3 • Published 3 years ago

@rbxts/rich-text-stream v2.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

@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();
2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago