Class MarkdownComposer
Turns typed Markdown into the formatted_body HTML of a message, like Element does.
Inherited Members
Namespace: Uniform.Matrix.Client.Formatting
Assembly: Uniform.Matrix.Client.dll
Syntax
public static class MarkdownComposer
Methods
| Edit this page View SourceToHtml(string, IReadOnlyDictionary<string, string>?)
Return HTML for text, or null when it has no formatting and no mentions, so plain messages stay plain.
Declaration
public static string? ToHtml(string text, IReadOnlyDictionary<string, string>? mentions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Typed text, sent unchanged as |
| IReadOnlyDictionary<string, string> | mentions | Display names to turn into mention pills, mapped to user IDs. |
Returns
| Type | Description |
|---|---|
| string |
Examples
string? html = MarkdownComposer.ToHtml("**hi** Bob", new Dictionary<string, string> { ["Bob"] = "@bob:matrix.org" });