danielsaidi / RichTextKit

RichTextKit is a Swift SDK that helps you use rich text in Swift and SwiftUI.
MIT License
944 stars 126 forks source link

Images are not initially resized on iOS #50

Closed danielsaidi closed 1 year ago

danielsaidi commented 1 year ago

When adding an image to a RichTextEditor in a document-based iOS app, the image is correctly resized.

However, when later opening the document with the image, the image is not initially resized to fix the screen. As you then start to type, the image is resized as the text changes.

danielsaidi commented 1 year ago

I could get this to work by moving the resizing code to before setting the text.