Closed DesantBucie closed 2 weeks ago
svg.js by default creates elements in the svg namespace. Browser dont render divs in svg namespace. In order to create an element in html namespace, you can pass true
to the SVG function:
canvas.foreignObject(100, 100).add(SVG(`<div contenteditable="true" style="color:black;">Text</div>`, true))
Here is your fixed example: https://jsfiddle.net/jd0x6mos/
Thanks a lot.
Bug report
Fiddle
https://jsfiddle.net/qau8cs9g/12/
Explanation