CodeEditorView
CodeEditorView copied to clipboard
State up front that there are two products
When I try to compile the code, I get:
Cannot find type 'TextLocated' in scope
` import SwiftUI import CodeEditorView
struct MyCodeEditorView: View { @State private var text: String = "My awesome code..." @State private var position: CodeEditor.Position = CodeEditor.Position() @State private var messages: Set<TextLocated<Message>> = Set()
@Environment(\.colorScheme) private var colorScheme: ColorScheme
var body: some View {
CodeEditor(text: $text, position: $position, messages: $messages, language: .swift)
.environment(\.codeEditorTheme,
colorScheme == .dark ? Theme.defaultDark : Theme.defaultLight)
}
} `