Garry's Mod Wiki

markup.Parse

MarkupObject markup.Parse( string markup, number maxwidth )

Description

Parses markup into a MarkupObject. Currently, this only supports fonts and colors as demonstrated in the example.

Arguments

1 string markup
The markup to be parsed.
2 number maxwidth
The max width of the output

Returns

1 MarkupObject
The parsed markup object ready to be drawn.

Example

Renders a markup string on the HUD.

local parsed = markup.Parse("<font=Default>changed font\n<colour=255,0,255,255>changed colour</colour=255,0,255,255></font=Default>
Output:

Page Links


Special Pages


Wikis

?

Render Time: 32ms

Session 0
DB GetPage 3
Generate Html 7
SaveChanges 15
Render Body 0
Render Sidebar 6