Contents

loadFromHTML(fileURL:options:completionHandler:)

Creates an attributed string by converting the content of a local HTML file at the specified URL.

Declaration

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

Parameters

  • fileURL:

    A URL that specifies the file to load.

  • 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