Reputation: 1336
I'd like to use regular HTML tags (for instance an input tag) within an SVG tag.
Why? I would like my SVG graphic to be able to get text from the user (e.g., the user clicks on a box drawn with SVG and enters text on it), so I was thinkig about using HTML input tags within an SVG tag. Is this possible?
If the answer is no (which most probably will), how can I allow a user edit SVG text?
Upvotes: 2
Views: 3863
Reputation: 2017
There is already an answer to that question:
how to change svg text tag using javascript innerHTML
But its not accepted.
It seems to be possible when you look at this example
http://starkravingfinkle.org/blog/wp-content/uploads/2007/07/foreignobject-text.svg
from this source:
http://ajaxian.com/archives/foreignobject-hey-youve-got-html-in-my-svg
Upvotes: 3