Text in SVG's foreignObject not selectable -
i have svg
, want display text within that. due limited text formatting options available in svg
i've read can recommended use html text instead. thus, inside of svg
whenever want show text have foreignobject
, within text p
.
so structure is: svg -> foreignobject -> p
works far! however, cannot select text within p
mouse. there workaround?
edit: looks works in easy example shown in answer below, reason not work in structure here.
works fine me.
<svg width="200px" height="80px"> <foreignobject width="200px" height="80px"> <html style="font-size:30px"> <p>select me</p> </html> </foreignobject> </svg>
Comments
Post a Comment