https://github.com/Lakr233/MarkdownView.git
A powerful pure UIKit framework for rendering Markdown documents with real-time parsing and rendering capabilities. Battle tested in FlowDown.
Add the following to your Package.swift file:
dependencies: [
.package(url: "https://github.com/Lakr233/MarkdownView", from: "3.6.0"),
]
Platform compatibility:
import MarkdownView
struct ContentView: View {
var body: some View {
MarkdownView("# Hello World")
}
}
With custom theme:
MarkdownView("# Hello World", theme: .default)
import MarkdownView
import MarkdownParser
let markdownTextView = MarkdownTextView()
let parser = MarkdownParser()
let result = parser.parse("# Hello World")
let content = MarkdownTextView.PreprocessedContent(parserResult: result, theme: .default)
markdownTextView.setMarkdown(content)
Check out the included example project to see MarkdownView in action:
cd Example
open Example.xcodeproj
This project is licensed under the MIT License. See the LICENSE file for details.
This project includes code adapted from swift-markdown-ui by Guillermo Gonzalez, used under the MIT License.