andyduke / styled_text_package

Text widget with formatted text using tags. Makes it easier to use formatted text in multilingual applications.
https://pub.dev/packages/styled_text
BSD 3-Clause "New" or "Revised" License
74 stars 48 forks source link

An example of how handle html tags? #57

Closed ademar111190 closed 2 years ago

ademar111190 commented 2 years ago

It would be nice to have a sample on how to handle some HTML tags such as <p> <ul> <li> <ol> <blockquote> <h1,2,3,…> etc… maybe a default for each one in the library?

andyduke commented 2 years ago

@ademar111190 StyledText should not be considered as an HTML render, it has a different purpose - the output of formatted text, where XML (not HTML) is used as a markup language, so there are no predefined tags. You need to define the visual representation of the tags yourself. In addition, complex HTML tags like <table> are not supported, because this would significantly complicate the widget.