我正在尝试构建一个SVG文本编辑器,允许用户通过键入来修改文本内容。我想知道如果可以像下面的演示一样实现文字效果吗?
我可以使用Ai来构建文本转换效果,然后使用svg格式保存它。但是文本将成为"路径",因此用户无法通过键入来修改文本内容。
这是Ai制作的演示: https://jsfiddle.net/m31s7eg7/
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 167.92 152.98"><title>love</title><path d="M24.7,33.66c2.35-2.28,3.56-3.37,6-5.45v86.67a104.2,104.2,0,0,0,21.83,11.45V140A171.09,171.09,0,0,1,24.7,120Z" transform="translate(-24.7)"/><path d="M106.84,75.22c0,12.55-2.87,84.31-27.47,77.28C56.72,146,54,98.41,54,78c0-21,2.78-70.36,26.24-77C103.87-5.82,106.83,62.29,106.84,75.22Zm-45.25,2.4c0,16.42,3,56.64,18.21,59.53,15.73,3,18.9-48.37,18.9-61,0-13-3.47-62.36-18.81-59.67C64.3,19.21,61.59,60.86,61.59,77.61Z" transform="translate(-24.7)"/><path d="M129.87,151.8Q120,75.93,110.48,0c3.33,0,5,.13,8.31.4Q123.38,38.05,128,75.7c2.29,18.46,4.61,36.92,6.28,55.45l.17,0c1.79-18.44,4.18-36.8,6.65-55.16q4.71-34.27,9.68-68.51c3.12,1.15,4.67,1.77,7.71,3.14C151.19,57,144.61,103.5,138.21,150,134.89,150.86,133.22,151.21,129.87,151.8Z" transform="translate(-24.7)"/><path d="M190.58,79.62c-7.21.41-11.11.6-19.26.9v42.93a100,100,0,0,0,21.3-12.84c0,3.74,0,5.61,0,9.35a170.91,170.91,0,0,1-28.17,20.23q0-63.38,0-126.76A171.61,171.61,0,0,1,191.6,32.69c0,3.82,0,5.73,0,9.56a100.36,100.36,0,0,0-20.28-12.08V67.8c8.15.74,12,1.18,19.26,2.19Z" transform="translate(-24.7)"/></svg>
有什么想法实现这个目标吗?也许在服务器端转换文本?
非常感谢。