title: Javascript - create an array of words and tags from a paragraph
body: <p>I have this:</p>
  
  <pre><code>&lt;p&gt;&lt;strong&gt;test the strong tag&lt;/strong&gt; some dummy text &lt;a href="#" target="_blank"&gt;test the link&lt;/a&gt; some other text &lt;a href="#" target="_blank"&gt;Test another link&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p>I need an JS array:</p>
  
  <pre><code>['&lt;strong&gt;Test the strong tag&lt;/strong&gt;', 'some', 'dummy', 'text', '&lt;a href="#" target="_blank"&gt;test the link&lt;/a&gt;', 'some', 'other', 'text', '&lt;a href="#" target="_blank"&gt;Test another link&lt;/a&gt;']
  </code></pre>
  
  <p>Help, im giving up!</p>
  
  <p>p.s. It's a part of a bigger idea to distribute the content of a section into horizontal slides (which can be animated to left and right). For that i need every word being wrapped into span to measure its position and determine if it belongs to the next "line". sry it's hard to explain the whole thing.</p>