title: How to replace DOM elements with a Vue component?
body: <p>I inject raw html into my page. I would like to extract all the <code>&lt;a&gt;</code> elements in this and replace them with my <code>&lt;custom-link-component&gt;</code>. Is there a way of doing this with Vue?</p>
  
  <p>I get raw html from the data service and inject it into a vue component using v-html.</p>
  
  <p>So far I have a mixin that finds all <code>&lt;a&gt;</code> elements but can't work out how to replace them:</p>
  
  <pre><code>const links = document.querySelectorAll('a');
  </code></pre>
  
  <p>Many thanks.</p>