Skip to content
Pavel Kasila edited this page Aug 30, 2021 · 4 revisions

Welcome to the SwiftyMonaco wiki!

SwiftyMonaco is a wrapper for Monaco Editor from Microsoft.

image

Supported platforms

Platform State
macOS 11+ seems to run relatively stable
iPadOS 14+ instable, not tested

Features

  • Syntax highlighting
  • Automatic interface theme detection

Basic example

struct EditorView: View {
    @State var text: String
    
    var body: some View {
        SwiftyMonaco(text: $text)
    }
}

Remember! You should allow outgoing internet connections in your app before using this library, because Monaco Editor runs inside WKWebView and macOS considers it as an outgoing internet connection (Network -> Outgoing connections (Client)):

image

Theming

image image
Clone this wiki locally