Contents

loadFromHTML(request:options:completionHandler:)

Creates an attributed string by converting the contents of the specified HTML URL request.

Declaration

class func loadFromHTML(request: URLRequest, options: [NSAttributedString.DocumentReadingOptionKey : Any] = [:], completionHandler: @escaping  @Sendable (NSAttributedString?, [NSAttributedString.DocumentAttributeKey : Any]?, (any Error)?) -> Void)
class func fromHTML(request: URLRequest, options: [NSAttributedString.DocumentReadingOptionKey : Any] = [:]) async throws -> (NSAttributedString, [NSAttributedString.DocumentAttributeKey : Any])

Parameters

  • request:

    A request to fetch an HTML document.

  • options:

    Specifies additional options for loading the document. For a list of possible keys, see Nsattributedstringdocumentreadingoptionkey.

  • completionHandler:

    A completion handler to execute with the results.

See Also

Creating from HTML