I'm attempting to generate the svg text wrapped to fit inside another svg. d3plus contains the textbox module, which has two functions that will do this, but I need to capture the output not render it directly to the dom. I can't see how I can do this having looked at the code.
I have been looking at this example, as a guide to implementing it. https://d3plus.org/examples/d3plus-text/getting-started/