Using MarkupEditor in a scrollview with other ui components
Opened this issue · 1 comments
Hi @stevengharris, would like to know if you have considered whether MarkupEditorView could be in a Scrollview, along side with other UI components such as a TextField etc, in the ScrollView.
In my example project, I am using it with a couple of TextFields and the MarkupEditorView is the last component at the bottom. I am aware that in that scenario, it should require turning off the scrolling on the webView of MarkupEditorView, but another concern will be to determine the intrinsic size of the webView.
No, I haven't thought about it directly. I was using many MarkupWKWebViews in a List for quite a while, which worked okay from a scrolling and even view re-use perspective, but ultimately I replaced this with the approach in #178. I'm using this approach to put many contentEditable divs along with non-editable ones in a single MarkupWKWebview so that I can scroll the overall page and let the web view machinery deal with the sizing/flow. I'm not sure if this kind of approach would work for you, since the items in the web view are all HTML entities, not iOS views, but it might be something to consider.
I do think the only times I've done something similar to what you're talking about is when the MarkupWKWebView itself is non-scrolling by autosizing. Since I'm not using a list of autosized views any more, I'd have to go digging a bit to reconstruct exactly how I dealt with it. I believe I just used the MarkupDelegate.markup(_:heightDidChange:)
callback to adjust the frame size.