title: turn toDataUrl base64 string into image on page
body: <p>I have created a custom product configurator and i am using html2canvas to generate a base64 encoded string of a canvas element. </p>
  
  <p>If you go to: <a href="http://faithpointdallas.com/ecom/page/customStole" rel="nofollow">http://faithpointdallas.com/ecom/page/customStole</a> you can see that when you click "add to cart" at the bottom, it uses the html2canvas script to alert a generated base64 encoded string.</p>
  
  <p>My question is: How can i take that base64 encoded string and turn it into a regular image tag. Like <code>&lt;img src="myconvertedbase64string.PNG" /&gt;</code></p>
  
  <p>Here is the code that is generating the string:</p>
  
  <pre><code>$('#addToCart').click(function(event) {
  event.preventDefault();
  var target = $('.customstole');
  html2canvas(target, {
  onrendered: function(canvas) {
      var data = canvas.toDataURL();
      alert(data);
      // data is the Base64-encoded image
  }
  </code></pre>
  
  <p>});
  });</p>