Text
public struct Text
The wrapper for the message text in different formats: plain text, markdown, and html. An instance of Text can only be one of HTML, Markdown or Plain
Since
2.3.0-
Returns the plain text if exist
Declaration
Swift
public private(set) var plain: String? { get } -
Returns the html if exist.
Declaration
Swift
public private(set) var html: String? { get } -
Returns the markdown if exist.
Declaration
Swift
public private(set) var markdown: String? { get } -
Make a Text object for the plain text.
Declaration
Swift
public static func plain(plain: String) -> TextParameters
plainThe plain text.
-
Make a Text object for the html.
Since
3.4.0Declaration
Swift
public static func html(html: String) -> TextParameters
htmlThe text with the html markup.
-
Make a Text object for the markdown.
Since
3.4.0Declaration
Swift
public static func markdown(markdown: String) -> TextParameters
markdownThe text with the markdown markup.
-
Make a Text object for the html.
Declaration
Swift
@available(*, deprecated, message: "Use html(html: String﹚ instead") public static func html(html: String, plain: String? = nil) -> TextParameters
htmlThe text with the html markup.
plainThis param is ignored. null can be passed.
-
Make a Text object for the markdown.
Declaration
Swift
@available(*, deprecated, message: "Use markdown(markdown: String﹚ instead") public static func markdown(markdown: String, html: String, plain: String? = nil) -> TextParameters
markdownThe text with the markdown markup.
htmlThis param is ignored. null can be passed.
plainThis param is ignored. null can be passed.
View on GitHub