title: How to convert NSAttributedString (with image) into HTML?
body: <p>I know how to convert the common <code>NSAttributedString</code> (which has no image) into HTML. I set the Images as <code>NSTextAttachment</code> to <code>NSAttributedString</code> (these attributed strings are set as <code>attributeText</code> of a <code>UITextView</code>). How could I convert the whole attributed string into HTML?</p>
  
  <p>I‘ve found an answer <a href="https://stackoverflow.com/a/21583127/4875807">related solution</a>,which mentions:</p>
  
  <blockquote>
    <p>Simple idea for image: encode it with base64 and put it directly in a &lt; img > tag with the right frame.</p>
  </blockquote>
  
  <p>But how could i implement that?</p>