Class
StyledText
ConsoleMonster.Text
Multi-line styled text: the result of parsing markup or splitting plain text into lines.
Inheritance
- object
- StyledText
Usage
Explore 7 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 6
- Method RenderContext.Markup
- Method SymbolFallback.Apply
- Method Markup.Parse
- Method RichText.ToStyledText
- Method StyledText.FromPlain
- Method StyledText.FromSpans
Accepted by parameters 1
- Method SymbolFallback.Apply
Constructors
public StyledText(IReadOnlyList<StyledLine> lines) #Creates styled text from lines.
Parameters
- lines System.Collections.Generic.IReadOnlyList<ConsoleMonster.Text.StyledLine>
- The lines.
Methods
public static StyledText FromPlain(string? text, Style style = default) #Splits plain text (no markup) into lines with one style.
Parameters
- text string?
- The text; \r\n, \n and \r separate lines.
- style ConsoleMonster.Styling.Style = default
- The style.
public static StyledText FromSpans(IEnumerable<TextSpan> spans) #Creates styled text from spans that may contain line breaks.
Parameters
- spans System.Collections.Generic.IEnumerable<ConsoleMonster.Text.TextSpan>
- The spans.