CodeEditorView icon indicating copy to clipboard operation
CodeEditorView copied to clipboard

State up front that there are two products

Open ayrtonsoftware opened this issue 1 year ago • 1 comments

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)
}

} `

ayrtonsoftware avatar Nov 02 '23 00:11 ayrtonsoftware