Forum Feature requests

Support for foreign objects in SVG?

Richard B. Kreckel
I've seen a few feature requests for SVG foreign object support in Prince, but they're all many years old. Also, there's an item on the roadmap.

May I ask what the status regarding this feature is? I'm asking because this is becoming more and more common, for instance in they seem to be using it often (see
We will take another look at this feature.
Richard B. Kreckel
Any news yet on foreign objects? (Sorry for being a nuisance.)
Not yet, it requires a bit of a rethink of the way we handle things!
+1, we have hit a stumbling block without foreignObject. Reason for foreignObject is the limited abilities of <text> and dealing with multiline.

We place divs inside of the foreignObject. Any ideas for a potential workaround? Would it involve us lifting the <divs> outside of the <svg> and positioning absolute?
Yes, for multiline text it is simplest to use HTML outside of the SVG for now.
I wanted to add a vote for HTML foreign objects inside SVG, too.
Foreign objects are essential to mermaid diagrams. Hope this feature could be implemented in the near future.