Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func convertHtml() -> NSAttributedString{
- if let theData = self.data(using: .utf16) {
- do {
- let theString = try NSAttributedString(data: theData, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil)
- return NSAttributedString(attributedString: theString)
- } catch { print("\(error)") }
- }
- return NSAttributedString(self)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement