diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-06 12:45:37 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-06 12:45:37 +0200 |
| commit | 54f89bcd1a7fb0b92b65d8c0ea3847d635e11133 (patch) | |
| tree | da6c1e3f015c4b21a2e32854cadb09e71f9079e7 /Map/Presentation/MapEditor.swift | |
| parent | 3cd8f1f7200109d505b5e105d5ebe53f0c93d337 (diff) | |
Allow adding and removing templates
Diffstat (limited to 'Map/Presentation/MapEditor.swift')
| -rw-r--r-- | Map/Presentation/MapEditor.swift | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Map/Presentation/MapEditor.swift b/Map/Presentation/MapEditor.swift index 5dc1adb..5005a73 100644 --- a/Map/Presentation/MapEditor.swift +++ b/Map/Presentation/MapEditor.swift @@ -91,10 +91,17 @@ struct MapEditor: View { } adaptiveStack { ZStack(alignment: .topLeading) { - MapTextEditor(document: $document, highlightRanges: results, selectedRange: selectedTerm) - .background(Color.Theme.UI.background) - .foregroundColor(Color.Theme.UI.foreground) - .frame(minHeight: 96.0) + MapTextEditor( + text: Binding( + get: { document.text }, + set: { document.text = $0 } + ), + highlightRanges: results, + selectedRange: selectedTerm + ) + .background(Color.Theme.UI.background) + .foregroundColor(Color.Theme.UI.foreground) + .frame(minHeight: 96.0) } .background(Color.Theme.UI.background) .cornerRadius(5.0) |