You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to embed the RichTextEditor inside a ScrollView and disable the scrolling of the RichTextEditor like this:
import SwiftUI
import RichTextKit
structTest:View{@Statevartext:NSAttributedString=NSAttributedString(string:"This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. This is a very long string. ")@StateObjectvarcontext=RichTextContext()varbody:someView{ScrollView{Text("Title")RichTextEditor(
text: $text,
context: context,
viewConfiguration:{ view in
if let richTextView = view as?RichTextView{
richTextView.configuration.isScrollingEnabled = false
}})}}}
#Preview {Test()}
However, the result was:
It seems that the RichTextEditor won't adjust its height when scrolling is disabled and at the same time embedded into a ScrollView.
The text was updated successfully, but these errors were encountered:
I was trying to embed the RichTextEditor inside a ScrollView and disable the scrolling of the RichTextEditor like this:
However, the result was:
It seems that the RichTextEditor won't adjust its height when scrolling is disabled and at the same time embedded into a ScrollView.
The text was updated successfully, but these errors were encountered: