UniversalRenderer

public class UniversalRenderer

A simple renderer to adapt HTML content including custom emojis or render them as plain text

  • Undocumented

    Declaration

    Swift

    public init()
  • Renders the provided HTML string

    Declaration

    Swift

    public func render(html: String?,
                       emojis: [Emoji]) throws -> TootContent

    Parameters

    html

    html description

    emojis

    the custom emojis used in the HTML, provided with shortcode values between “:”

    Return Value

    an instance TootContent with various representations of the content

  • Renders the provided HTML string

    Declaration

    Swift

    public func render(html: String,
                       emojis: [Emoji]) throws -> TootContent

    Parameters

    html

    html description

    emojis

    the custom emojis used in the HTML, provided with shortcode values between “:”

    Return Value

    an instance TootContent with various representations of the content

  • Renders a post into TootContent

    Declaration

    Swift

    public func render(_ tootPost: Post) -> TootContent

    Parameters

    tootPost

    the post to render

    Return Value

    the TootContent constructed