danielsaidi / RichTextKit

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

Add support for disabling the active scroll view of the text editor #118

Closed screenworker closed 9 months ago

screenworker commented 10 months ago

It would be nice if the text editor offered a way to disable the scrollview. Ideally, the height of the text editor should also be fixed so that the text editor can also be used inside a SwiftUI ScrollView or List.

import SwiftUI

ScrollView {
    RichTextEditor(text: text, context: context)
    .onAppear {
         context.scrollingDisabled = true
    }
}