SwiftDown icon indicating copy to clipboard operation
SwiftDown copied to clipboard

Markdown Processor source?

Open benjitusk opened this issue 2 years ago • 5 comments

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)
        }
    }
}

benjitusk avatar Aug 26 '22 03:08 benjitusk

Hi @benjitusk,

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

qeude avatar Dec 26 '22 12:12 qeude

Yes, exactly that

benjitusk avatar Dec 26 '22 12:12 benjitusk

Isn't this covered by the SwiftUI Text component?

qeude avatar Dec 26 '22 12:12 qeude

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

benjitusk avatar Dec 26 '22 12:12 benjitusk

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

qeude avatar Dec 26 '22 13:12 qeude