JSFiddle - React, Tailwind, and code Playground

HTML

<embed width="100" height="100" type="image/svg+xml" src="path.svg">
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <defs>
      <path id="textPath" d="M50 50 C20 0 190 0 250 50"/>
    </defs>     
    <text fill="black" font-size = "12" font-family = "arial">
      <textPath id = 'test' xlink:href="#textPath">Text on a Path ... Text on a Path</textPath>
    </text>  
  </svg>
</embed>

CSS

#textPath {
    border: 1px solid #ff0000;
}
#test {
    border: 1px solid #ff0000;
}

JavaScript

var temp = document.getElementById('textPath');
console.log(temp.innerHTML);