gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI
MIT License
2.25k stars 268 forks source link

Width is always maximum #107

Closed developerfromjokela closed 2 years ago

developerfromjokela commented 2 years ago

Hello!

I'm trying to do chat bubbles with markdown formatting, but Markdown UI seems to use full width always.

Is it possible to set dynamic width, so no space is wasted?

developerfromjokela commented 2 years ago

@gonzalezreal @reinhart1010 ?

gonzalezreal commented 2 years ago

Sadly this is not possible at the moment, as the Markdown view is implemented with a UIViewRepresentable, limiting the ability to size the view correctly. The workaround is to use the frame(width:height:alignment:) view modifier.

developerfromjokela commented 1 year ago

It is possible, check it out:

https://github.com/wilmaplus/MarkdownUI

@gonzalezreal