Closed screenworker closed 10 months ago
This looks great @screenworker - I understand the need and absolutely want to add this to the library.
There are some conflicts after the latest changes. Do you want me to fix those, or do you prefer to do it? I'd also switch, so the naming is isScrollEnabled
instead of having the negation :)
@DominikBucher12 If you're thinking about adding a configuration
parameter, that's what I'm thinking too. Instead of having many parameters, let's just go for a single config parameter.
I would be very happy if you solved the problems yourself. I actually just wanted to contribute to further development with this post. You have been involved in the project much further. It can definitely be better in one place or another.
Hi again @screenworker
I have added support for this in another way. You can now provide a configuration to the RichTextEditor
, which it then passes down to the rich text view.
This configuration has a property for isScrollingEnabled
, which by default is true
. Please try it out and let me know if it works for you.
I will close this PR but would love to add your inline editor to the demo. Please feel free to create another PR with this functionality.
I will release support for this context in the upcoming 0.9.7
.
@danielsaidi has this been merged?
I tried:
RichTextFormatSidebar(context: context)
.onAppear {
context.isScrollingEnabled = true
}
But Xcode prints: Value of type 'RichTextContext' has no dynamic member 'isScrollingEnabled' using key path from root type 'RichTextContext'
@alelordelo yes, but please try the implementation of @danielsaidi. My approach was only an idea to implement this feature.
For my macOS project it is necessary to have a way to turn off the automatic scrolling behavior of the richtext editor because I want to place the richtext editor view in a scroll view between two other view elements. I think this would also be feasible for other users. this could be a solution for that.
Issue: https://github.com/danielsaidi/RichTextKit/issues/118