-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font sizing doesn't work #171
Labels
discussion
Discussions not yet turned into an action
Comments
Hi @kovs705 First of all, the context must be a Can you fix that and see if it helps? |
import SwiftUI
import RichTextKit
struct MyView: View {
@StateObject var context = RichTextContext()
@State var attributedNoteText: NSAttributedString = NSAttributedString(string: "Test text")
var body: some View {
RichTextEditor(text: $attributedNoteText, context: context) {
$0.setRichTextFontSize(50)
}
.focusedValue(\.richTextContext, context)
.frame(maxWidth: .infinity)
.frame(minHeight: 100)
.richTextEditorStyle(.init(font: .preferredFont(forTextStyle: .extraLargeTitle)))
}
}
#Preview {
MyView()
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to make a font bigger but I receive strange text in console:
my code:
result:
The text was updated successfully, but these errors were encountered: