Text

public struct Text

The wrapper for the message text in different formats: plain text, markdown, and html. Please note this version of the SDK requires the application to convert markdown to html. Future version of the SDK will provide auto conversion from markdown to html.

Since

2.3.0
  • Make a Text object for the plain text.

    Declaration

    Swift

    public static func plain(plain: String) -> Text

    Parameters

    plain

    The plain text.

  • Make a Text object for the html.

    Declaration

    Swift

    public static func html(html: String, plain: String? = nil) -> Text

    Parameters

    html

    The text with the html markup.

    plain

    The alternate plain text for cases that do not support html markup.

  • Make a Text object for the markdown.

    Declaration

    Swift

    public static func markdown(markdown: String, html: String, plain: String? = nil) -> Text

    Parameters

    markdown

    The text with the markdown markup.

    html

    The html text for how to render the markdown. This will be optional in the future.

    plain

    The alternate plain text for cases that do not support markdown and html markup.