aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/MapEditor.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Presentation/MapEditor.swift')
-rw-r--r--Map/Presentation/MapEditor.swift15
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)