loadFromHTML(string:options:completionHandler:)
Creates an attributed string from the specified HTML string.
Declaration
class func loadFromHTML(string: String, options: [NSAttributedString.DocumentReadingOptionKey : Any] = [:], completionHandler: @escaping @Sendable (NSAttributedString?, [NSAttributedString.DocumentAttributeKey : Any]?, (any Error)?) -> Void)class func fromHTML(_ string: String, options: [NSAttributedString.DocumentReadingOptionKey : Any] = [:]) async throws -> (NSAttributedString, [NSAttributedString.DocumentAttributeKey : Any])Parameters
- string:
A string that contains the HTML to convert to an attributed string.
- 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.