We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func htmlAttributed(size: CGFloat) -> NSAttributedString? { do { let htmlCSSString = "<style>" + "html *" + "{" + "font-size: \(size)pt !important;" + "}</style> \(self)" guard let data = htmlCSSString.data(using: String.Encoding.utf8) else { return nil } return try NSAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html, .characterEncoding: String.Encoding.utf8.rawValue], documentAttributes: nil) } catch { print("error: ", error) return nil } } let text = "<b> Bold</b><i> Italic</i> <u>Underline</u>" self.activeLabel.attributedText = text.htmlAttributed(size: 15)
Output Bold Italic Underline
Its returning everything in bold instead of desired output.
The text was updated successfully, but these errors were encountered:
@schickling, @maziyarpanahi , @polqf please look into this.
Sorry, something went wrong.
No branches or pull requests
Output
Bold Italic Underline
Its returning everything in bold instead of desired output.
The text was updated successfully, but these errors were encountered: