does anybody know how to paste an image from clipboard to a textEditor or UITextView?
I cannot find a way to do it in Swiftui.
goal: create a oneNote or notion app where you can have text and images in the same field
does anybody know how to paste an image from clipboard to a textEditor or UITextView?
I cannot find a way to do it in Swiftui.
goal: create a oneNote or notion app where you can have text and images in the same field
I don’t know if this is possible in SwiftUI, I would guess no
It looks like they may help get you started
let attachment = NSTextAttachment()
attachment.image = scaledImage
let imageString = NSAttributedString(attachment: attachment)
textView.textStorage.insert(imageString, at: indexWhereYouWantTheImage)