WikipediaAttributedExtract
public struct WikipediaAttributedExtract
A struct used to hold a Wikipedia rich text extract. It can be used to generate NSAttributedString representations from it.
-
The extract’s HTML string.
Declaration
Swift
public let htmlString: String
-
Generates and attributed string by parsing the receiver’s htmlString and using a given font as the resulting string base font.
Throws
A Foundation error in case the NSAttributedString could not be generated.Declaration
Swift
public func attributedString(using font: OSFontType) throws -> NSAttributedString
Parameters
font
The font to be used as the attributed string base font.
Return Value
The generated attributed string.