The following code is working fine. Run the code snippet what it does.
Maybe it can be cleaned up or make it automatically work with all text tags in SVG.
function svg_textMultiline() {_x000D_
_x000D_
var x = 0;_x000D_
var y = 20;_x000D_
var width = 360;_x000D_
var lineHeight = 10;_x000D_
_x000D_
_x000D_
_x000D_
/* get the text */_x000D_
var element = document.getElementById('test');_x000D_
var text = element.innerHTML;_x000D_
_x000D_
/* split the words into array */_x000D_
var words = text.split(' ');_x000D_
var line = '';_x000D_
_x000D_
/* Make a tspan for testing */_x000D_
element.innerHTML = '<tspan id="PROCESSING">busy</tspan >';_x000D_
_x000D_
for (var n = 0; n < words.length; n++) {_x000D_
var testLine = line + words[n] + ' ';_x000D_
var testElem = document.getElementById('PROCESSING');_x000D_
/* Add line in testElement */_x000D_
testElem.innerHTML = testLine;_x000D_
/* Messure textElement */_x000D_
var metrics = testElem.getBoundingClientRect();_x000D_
testWidth = metrics.width;_x000D_
_x000D_
if (testWidth > width && n > 0) {_x000D_
element.innerHTML += '<tspan x="0" dy="' + y + '">' + line + '</tspan>';_x000D_
line = words[n] + ' ';_x000D_
} else {_x000D_
line = testLine;_x000D_
}_x000D_
}_x000D_
_x000D_
element.innerHTML += '<tspan x="0" dy="' + y + '">' + line + '</tspan>';_x000D_
document.getElementById("PROCESSING").remove();_x000D_
_x000D_
}_x000D_
_x000D_
_x000D_
svg_textMultiline();
_x000D_
body {_x000D_
font-family: arial;_x000D_
font-size: 20px;_x000D_
}_x000D_
svg {_x000D_
background: #dfdfdf;_x000D_
border:1px solid #aaa;_x000D_
}_x000D_
svg text {_x000D_
fill: blue;_x000D_
stroke: red;_x000D_
stroke-width: 0.3;_x000D_
stroke-linejoin: round;_x000D_
stroke-linecap: round;_x000D_
}
_x000D_
<svg height="300" width="500" xmlns="http://www.w3.org/2000/svg" version="1.1">_x000D_
_x000D_
<text id="test" y="0">GIETEN - Het college van Aa en Hunze is in de fout gegaan met het weigeren van een zorgproject in het failliete hotel Braams in Gieten. Dat stelt de PvdA-fractie in een brief aan het college. De partij wil opheldering over de kwestie en heeft schriftelijke_x000D_
vragen ingediend. Verkeerde route De PvdA vindt dat de gemeenteraad eerst gepolst had moeten worden, voordat het college het plan afwees. "Volgens ons is de verkeerde route gekozen", zegt PvdA-raadslid Henk Santes.</text>_x000D_
_x000D_
</svg>
_x000D_