I wrote a web application in which users can create svg elements with text. I want to simulate content elements inside svg elements so that users can dynamically edit the contents of svg elements. That is, when the user clicks on one of these elements, the cursor should appear so that the text can be edited. I do not want to use foreignobject to achieve this, since this is not supported by IE. I could not find anything useful about this on the Internet, so is there a way to do this?
EDIT. To clarify, here is an example:
<svg> <rect width="192" height="192" style="stroke-width: 3; fill:red"></rect> <text x="30" y="20">A sample text</text> </svg>
source share