0

I find I can't edit a svg text node at any time like HTML node by using "contenteditable" attribute. How mightI solve it? I have referred to this stackoverflow post. But it doesn't work.

How can I get the result that when I double-click a svg text node to edit it?

Please provide an example if you can explain it. Thank you.

Community
  • 1
  • 1
Houser
  • 1
  • 1

1 Answers1

0

Old Questions desereve an answer, too. So here it is:

contenteditable is not in the SVG1.1 Specs which means it does not work. However you can make the sorrounnding html editable which causes the whole svg to be editable. I anyway suggest NOT to do that because it most likely will destroy the whole svg when you try to edit it.

In the SVG2 specs the contenteditable attribute will be present!

Fuzzyma
  • 7,619
  • 6
  • 28
  • 60