BonMot icon indicating copy to clipboard operation
BonMot copied to clipboard

Parsing string like <em> some <red>important</red> text.</em>

Open phracek opened this issue 7 years ago • 3 comments

Hi,

BonMot works great. It is really faster then attributedText. But I would like to highlight a text like

<em> some <red>important</red> text. </em>

Any idea, how to solve it?

Greetings

Petr

phracek avatar Nov 30 '18 09:11 phracek

This should work if you use XML attributes. If it's not working for you, could you please post some code demonstrating the problem?

ZevEisenberg avatar Nov 30 '18 15:11 ZevEisenberg

@phracek were you able to get this working?

ZevEisenberg avatar Dec 17 '18 17:12 ZevEisenberg

Code for text generation is here: https://github.com/phracek/Katechismus_katolicke_cirkve_iOS/blob/develop/KatechismusKatolickeCirkve/KatechismusKatolickeCirkve/Utilities/GeneratorText.swift

Code for replacing text is: https://github.com/phracek/Katechismus_katolicke_cirkve_iOS/blob/develop/KatechismusKatolickeCirkve/KatechismusKatolickeCirkve/Controllers/ParagraphTableViewController.swift#L252

3rd item in my appliaction finds a word in database https://github.com/phracek/Katechismus_katolicke_cirkve_iOS/blob/develop/KatechismusKatolickeCirkve/KatechismusKatolickeCirkve/Supporting%20Files/database.json

phracek avatar Dec 18 '18 08:12 phracek