'SwiftUI - How to apply markdown to TextEditor?
With iOS 15 and Swift 5, I can add markdown to text, e.g
Text("Regular")
Text("*Italics*")
Text("**Bold**")
Text("~Strikethrough~")
Text("`Code`")
Text("[Link](https://apple.com)")
Text("***[They](https://apple.com) ~are~ `combinable`***")
But is it possible to somehow apply this to TextEditor as well? Can a user highlight some written text and apply specific markdown format to that text?
TextEditor(text: $notes) // how can $notes accept markdown here?
Solution 1:[1]
Maybe do this:
Text(content).lineLimit(nil)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jeremy Caney |
