Skip to content

Conversation

crazytonyli
Copy link
Contributor

@crazytonyli crazytonyli commented Sep 10, 2025

This is a quick prototype of creating a SwiftUI version of EditorViewController, using the new SwiftUI.WebView API in iOS 26. See the new GutenbergEditor SwiftUI view.

The idea is to extract the code that interacts with the Gutenberg library web view out of EditorViewController, which then can be reused by the GutenbergEditor SwiftUI view. WebBridge is the beginning of that.

At the moment, WebBridge only contains code that configures the Gutenberg editor library. Later, we can add more API to execute JavaScript functions within the web view.

You can try the new SwiftUI view via the demo app, by turning on the "Use SwiftUI WebView" toggle.

Potential next steps

I don't think we need to have a SwiftUI view at the moment, but I think it's worthwhile extracting some Gutenberg editor specific code out of the EditorViewController, which would put the library into a good position to create a SwiftUI view when needed.

So, I guess that could be the next steps? Moving some more code out of EditorViewController?

Base automatically changed from try-ios-26-swift-ui-webview to trunk September 10, 2025 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant