qeude / SwiftDown

📦 A themable markdown editor component for your SwiftUI apps.
MIT License
472 stars 50 forks source link

Markdown Processor source? #14

Open benjitusk opened 2 years ago

benjitusk commented 2 years ago

Can you release a swift package of the markdown engine? as in, an independent library I can import to use your markdown styling. For example, I'd like to use something like this:

import SwiftDownMD

struct Comment: View {
    let comment: Comment
    var body: some View {
        VStack {
            Markdown(comment.body)
        }
    }
}
qeude commented 1 year ago

Hi @benjitusk,

What would be the use case? It would be to render Markdown as a read only Text?

benjitusk commented 1 year ago

Yes, exactly that

qeude commented 1 year ago

Isn't this covered by the SwiftUI Text component?

benjitusk commented 1 year ago

Not quite. your markdown editor has much more extensive support for markdown than SwiftUI Text

qeude commented 1 year ago

I see, wouldn't a non-editable SwiftDownEditor make the trick? I think the best solution here would be to recreate the behaviour of SwiftDownEditor in an UILabel but it might take some time to implement