using Robust.Client.UserInterface.Controls; using Robust.Shared.Utility; namespace Content.Client.Message; public static class RichTextLabelExt { /// /// Sets the labels markup. /// /// /// Invalid markup will cause exceptions to be thrown. Don't use this for user input! /// public static RichTextLabel SetMarkup(this RichTextLabel label, string markup) { label.SetMessage(FormattedMessage.FromMarkupOrThrow(markup)); return label; } /// /// Sets the labels markup.
/// Uses FormatedMessage.FromMarkupPermissive which treats invalid markup as text. ///
public static RichTextLabel SetMarkupPermissive(this RichTextLabel label, string markup) { label.SetMessage(FormattedMessage.FromMarkupPermissive(markup)); return label; } }