This is how I have done it, and it is a long way from simple! But also, possibly more than you need. I am not sure that SVG text elements can be editable so…
https://elated-raman-0ffcc6.netlify.app/
This is an SVG drawing and it has an SVG foreignobject element inside of it, which is an HTML element that is content editable. The editor is built with mweiss/elm-rte-toolkit.