How to convert NSAttributedString (with image) to HTML?

I know how to convert a regular NSAttributedString (which has no image) to HTML. I set for images as NSTextAttachment in NSAttributedString (these attribute strings are set as attributeText for UITextView ). How to convert the entire sent string to HTML?

I found the answer is a related solution that says:

A simple idea for an image: encode it with base64 and place it directly in the <img> with the correct frame.

But how can I implement this?

+5
source share

Source: https://habr.com/ru/post/1245241/


All Articles