Text - Formatted HTML

I have an app where I am bringing some formatted text from the database.

The problem is when I use: Text(myDataComingFromJson), of course, my text will be something like:

  1. I've created an extension where I can remove the HTML tags but then all my text will be in only one paragraph and the lists won't exist ()

  2. The second approach would use WKWebView but then I will have some headaches formatting text or loading extra views to do the job.

Question: Is there a way to use Text directly, but keeping break lines and lists? Even though I have to change the content at the database level ? I also have tried using \r\n in the database but still didn't work. Is there a better solution?

Thank you all

Is there a way to use Text directly, but keeping break lines and lists? Can you show some examples of some formatted text? Generally, Text is not intended to show HTML content. Using the new feature AttributedString of iOS 15, you may be able to show some limited sets of HTML as formatted text, but depends on the actual contents you want to show.

Text - Formatted HTML
 
 
Q