MarkdownString

Human-readable text that supports formatting via the markdown syntax.

Rendering of theme icons via the $(<name>)-syntax is supported when the supportThemeIcons is set to true.

Rendering of embedded html is supported when supportHtml is set to true.

Online Documentation

Constructors

Link copied to clipboard
constructor(value: String = definedExternally, supportThemeIcons: Boolean = definedExternally)

Creates a new markdown string with the given value.

Properties

Link copied to clipboard
external var baseUri: Uri?

Uri that relative paths are resolved relative to.

Link copied to clipboard
external var supportHtml: Boolean?

Indicates that this markdown string can contain raw html tags. Defaults to false.

Link copied to clipboard
external var supportThemeIcons: Boolean?

Indicates that this markdown string can contain ThemeIcons, e.g. $(zap).

Link copied to clipboard
external var value: String

The markdown string.

Functions

Link copied to clipboard
external fun appendCodeblock(value: String, language: String = definedExternally): MarkdownString

Appends the given string as codeblock using the provided language.

Link copied to clipboard
external fun appendMarkdown(value: String): MarkdownString

Appends the given string 'as is' to this markdown string. When supportThemeIcons is true, ThemeIcons in the value will be iconified.

Link copied to clipboard
external fun appendText(value: String): MarkdownString

Appends and escapes the given string to this markdown string.