title: How to use text-anchor : middle in fabric js
body: <p>I have created svg from fabric js. While creating card i have applied text-align to object using below code:</p>
  
  <pre><code>activeObj.set({
      textAlign : 'center',
  });
  canvas.renderAll();
  </code></pre>
  
  <p>So my svg is look like below:</p>
  
  <p><a href="https://codepen.io/dhavalsisodiya/pen/BrRbRG" rel="nofollow noreferrer">https://codepen.io/dhavalsisodiya/pen/BrRbRG</a></p>
  
  <p>Now when i changed my {company_address} address variable with original value, that text should be align center but it is not.</p>
  
  <p><a href="https://codepen.io/dhavalsisodiya/pen/VXbRzy" rel="nofollow noreferrer">https://codepen.io/dhavalsisodiya/pen/VXbRzy</a></p>
  
  <p>Then i have modified SVG manually, I have added <code>text-anchor="middle"</code> in tspan tag of SVG (that is the placing of my varaible)</p>
  
  <p><a href="https://codepen.io/dhavalsisodiya/pen/ZxKPab" rel="nofollow noreferrer">https://codepen.io/dhavalsisodiya/pen/ZxKPab</a></p>
  
  <p>After adding that my text is appearing center in SVG. </p>
  
  <p>So is there a way to do that using fabric js, so it contain <code>text-anchor="middle"</code> when i apply text alignment?</p>
  
  <h1>Update</h1>
  
  <p>I have applied the textAnchor also, but it is not converting to svg.</p>
  
  <h1>Codepen</h1>
  
  <p><a href="https://codepen.io/dhavalsisodiya/pen/gvQooL" rel="nofollow noreferrer">https://codepen.io/dhavalsisodiya/pen/gvQooL</a></p>