I would like to display a <text>
in SVG what would auto-line-wrap to the container <rect>
the same way as HTML text fills <div>
elements. Is there a way to do it? I don't want to position lines separately by using <tspan>
s.
Xml – Auto line-wrapping in SVG text
svgtext;word-wrapxml
Related Topic
- Jquery – Using .text() to retrieve only text not nested in child tags
- C# – How to wrap text in a label using WPF
- Android – Auto Scale TextView Text to Fit within Bounds
- How to place and center text in an SVG rectangle
- Javascript – HTML5 Canvas vs. SVG vs. div
- Jquery – How to change color of SVG image using CSS (jQuery SVG image replacement)
- Linux – How to find all files containing specific text on Linux
- Css – way to use SVG as content in a pseudo element ::before or ::after
Best Answer
Text wrapping is not part of SVG1.1, the currently implemented spec. You should rather use HTML via the
<foreignObject/>
element.