Movatterモバイル変換


[0]ホーム

URL:


Usingmy app is also a way tosupport me:
KeyzerVidwall HubVidCropVidwallMousio HintMousioMusicerAudioerFileSentinelFocusCursorVideoerKeyClickerDayBarIconedMousioQuick RSSQuick RSSWeb ServeCopybook GeneratorDevTutor for SwiftUIRegexMateTime PassageIconize FolderTextsound SaverCreate Custom SymbolsDevHubResume RevisePalette GeniusSymbol Scribe

SwiftUI Markdown

Buy me a coffeeCISwiftUI Support

Render Markdown text in SwiftUI. It is a preview based on theMarked implementation.

Welcome to downloadDevTutor, a cheat sheet app designed to help developers quickly build excellent applications using SwiftUI.

DevTutor for SwiftUI AppStore

159059803-d844769b-36ad-44c1-a296-a657de8d099c.mov

Markdown Package Screenshot

Markdown Package Screenshot

Markdown Package Screenshot

Installation

You can add MarkdownUI to an Xcode project by adding it as a package dependency.

  1. From the File menu, select Add Packages…
  2. Enterhttps://github.com/jaywcjlove/swiftui-markdown the Search or Enter Package URL search field
  3. LinkMarkdown to your application target

Or add the following toPackage.swift:

.package(url:"https://github.com/jaywcjlove/swiftui-markdown", from:"1.0.0")

Oradd the package in Xcode.

Usage

importSwiftUIimportMarkdownstructContentView:View{@Stateprivatevar mdStr:String="""    ## Hello World    Render Markdown text in SwiftUI.    """var body:someView{VStack{Markdown(content: $mdStr)TextEditor(text: $mdStr)}}}

.markdownStyle()

Setting markdown related styles.

Markdown(content: $mdStr).markdownStyle(MarkdownStyle(        padding:0, paddingTop:115, paddingBottom:2, paddingLeft:130, paddingRight:5))
Markdown(content: $mdStr).markdownStyle(MarkdownStyle(padding:35))

Configure

image

Contributors

As always, thanks to our amazing contributors!

Made withcontributors.

License

Licensed under the MIT License.


[8]ページ先頭

©2009-2025 Movatter.jp