britzl / defold-richtext

Defold-RichText is a system to create styled text based on an HTML inspired markup language
MIT License
75 stars 12 forks source link

Add support for displaying images in the text #4

Closed britzl closed 6 years ago

britzl commented 6 years ago

Box nodes. Perhaps using <img> tag?

subsoap commented 6 years ago

How would it work?

<img src="texture_name"></img>
<img>texture_name</img>
britzl commented 6 years ago

Or maybe <img="texture_name"></img> or <img=texture_name></img>

The system is not setup to parse <img>texture_name</img>. Parameters should be inside the tag, like in <size=2> and <color=red>

And maybe I need to add support for to immediately close a tag. It should be easy to parse.

subsoap commented 6 years ago

Either <img="texture_name"/> Or have tags like img always not have a closing tag (cleaner)

I'd still add <br> for linebreaks if people want to use them over \n

britzl commented 6 years ago

Fixed in https://github.com/britzl/defold-richtext/releases/tag/2.1.0