Closed RiotGoesWoof closed 3 years ago
Hi
Supporting HTML in a foreignObject
would require some sort of HTML rendering engine. That would add a lot of bloat to AndroidSVG. One of my goals is to try to remain small as possible, so people can feel comfortable about including the library in their apps. So I think it is not very likely that support for foreignObject
will ever ever be added.
But you're right, that should be noted somewhere. So I've just added it to the "Not supported" section on the home page.
However, often people use foreignObject
in order to get automatic text wrapping. The potentially good news on that front is that the not-yet-adopted SVG 2 spec includes the property inline-size
, which enables text wrapping. There's a good chance that I will end up supporting that as part of the text system rewrite that I am working on at the moment.
Thanks Paul
I don't see it mentioned anywhere on the implementation page, and haven't been able to find anyone discussing or having an issue with it in the issues on GitHub. However, when I try to render an SVG with
<foreignObject>
tags, none of the HTML inside will render.Here is an example svg:
SVG taken from here, for viewing the expected result.