Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
struct ContentView: View {
@State var markdownText = ""
var body: some View {
HStack {
VStack {
Text("Markdown")
.fontWeight(.bold)
TextEditor(text: $markdownText)
.frame(width: 400)
.padding()
.background(Color(uiColor: .secondarySystemBackground))
.cornerRadius(16)
.padding(.bottom, 16)
}
VStack {
Text("Output")
.fontWeight(.bold)
Text("Output goes here!")
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
.padding()
.background(Color(uiColor: .secondarySystemBackground))
.cornerRadius(16)
.padding(.bottom, 16)
}
}
.font(.title2)
.padding()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment