Closed lucasmpaim closed 4 years ago
You should use StyleGroup
(it will be renamed to StyleXML
into the next version) in order to parse XML tags, including built-in img
tag.
So for your example:
let text = """
- Use maiúsculas e minúsculas <img named="therocket"/>
"""
let baseStyle = Style {
$0.font = UIFont.boldSystemFont(ofSize: 14)
$0.color = UIColor(hexString: "#8E8E8E")
}
let styleXML = StyleXML(base: baseStyle, [:])
self.textView?.attributedText = text.set(style: styleXML)
Current behaviour: Now, the tag are raw added on text, like:
Expected bahaviour: The correct bahaviour is change the "img" tag by correct image, like:
Code: