title: How save text, svg, html, css all together efficiently
body: <p>In an application, I am using <a href="http://kangax.github.com/fabric.js/demos/kitchensink/index.html" rel="nofollow">Fabric.js</a>, which lets users write text, draw SVG's, insert images etc.<br>
  I want to know, what is the best way to store this data.  </p>
  
  <p>Requirements are:</p>
  
  <ol>
  <li><p>Ability to query the data(text), which tells me that i should store it in DB (MySQL as of now)</p></li>
  <li><p>I have images, and I am targeting IPad as well, so the images are important, as to how they are stored.</p></li>
  <li><p>SVG's and HTML/CSS to be saved as well.</p></li>
  <li><p>I also want to do versioning of the content, as Quora does it, so that a user can see the changes from the past version to the current version. This also includes the versioning of images and SVG's.</p></li>
  </ol>
  
  <p>I am wondering how Google Docs does it, because they also store our documents, drawings etc.  </p>
  
  <p>What is the best way of doing this?</p>