MarkdownString class

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

Rendering of {@link ThemeIcontheme icons} via the $(<name>)-syntax is supported when the {@linkcode supportThemeIcons} is set to true.

Rendering of embedded html is supported when {@linkcode supportHtml} is set to true.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

MarkdownString.new([String? value, bool? supportThemeIcons])
factory

Properties

baseUri Uri

Available on MarkdownString, provided by the MarkdownString$Typings extension

Uri that relative paths are resolved relative to.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isTrusted Object

Available on MarkdownString, provided by the MarkdownString$Typings extension

Indicates that this markdown string is from a trusted source. Only trusted markdown supports links that execute commands, e.g. [Run it](command:myCommandId).
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportHtml bool

Available on MarkdownString, provided by the MarkdownString$Typings extension

Indicates that this markdown string can contain raw html tags. Defaults to false.
getter/setter pair
supportThemeIcons bool

Available on MarkdownString, provided by the MarkdownString$Typings extension

Indicates that this markdown string can contain {@link ThemeIcon ThemeIcons}, e.g. $(zap).
getter/setter pair
value String

Available on MarkdownString, provided by the MarkdownString$Typings extension

The markdown string.
getter/setter pair

Methods

appendCodeblock(String value, [String? language]) MarkdownString

Available on MarkdownString, provided by the MarkdownString$Typings extension

Appends the given string as codeblock using the provided language. @param value A code snippet. @param language An optional {@link languages.getLanguages language identifier}.
appendMarkdown(String value) MarkdownString

Available on MarkdownString, provided by the MarkdownString$Typings extension

Appends the given string 'as is' to this markdown string. When {@linkcode MarkdownString.supportThemeIcons supportThemeIcons} is true, {@link ThemeIcon ThemeIcons} in the value will be iconified. @param value Markdown string.
appendText(String value) MarkdownString

Available on MarkdownString, provided by the MarkdownString$Typings extension

Appends and escapes the given string to this markdown string. @param value Plain text.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited