{"id":15644960,"url":"https://github.com/jaywcjlove/swiftui-markdown","last_synced_at":"2025-04-13T12:08:32.983Z","repository":{"id":37910529,"uuid":"468436114","full_name":"jaywcjlove/swiftui-markdown","owner":"jaywcjlove","description":"Render Markdown text in SwiftUI.","archived":false,"fork":false,"pushed_at":"2025-04-02T14:53:36.000Z","size":1967,"stargazers_count":103,"open_issues_count":7,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T12:08:26.121Z","etag":null,"topics":["ios","macos","markdown","markdown-preview","markdown-viewer","swift","swift5","swiftui"],"latest_commit_sha":null,"homepage":"https://jaywcjlove.github.io/swiftui-markdown","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaywcjlove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"jaywcjlove","buy_me_a_coffee":"jaywcjlove","custom":["https://www.paypal.me/kennyiseeyou","https://jaywcjlove.github.io/#/sponsor"]}},"created_at":"2022-03-10T17:01:50.000Z","updated_at":"2025-04-09T12:14:34.000Z","dependencies_parsed_at":"2022-08-20T03:01:51.646Z","dependency_job_id":"a9be6237-46be-4a8c-bdb4-fe931d5c79bd","html_url":"https://github.com/jaywcjlove/swiftui-markdown","commit_stats":{"total_commits":51,"total_committers":5,"mean_commits":10.2,"dds":0.1568627450980392,"last_synced_commit":"e6b09bfbf5eb47111aa661d29ab990b62abac70e"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaywcjlove","download_url":"https://codeload.github.com/jaywcjlove/swiftui-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710431,"owners_count":21149190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","macos","markdown","markdown-preview","markdown-viewer","swift","swift5","swiftui"],"created_at":"2024-10-03T12:03:44.612Z","updated_at":"2025-04-13T12:08:32.977Z","avatar_url":"https://github.com/jaywcjlove.png","language":"Swift","funding_links":["https://ko-fi.com/jaywcjlove","https://buymeacoffee.com/jaywcjlove","https://www.paypal.me/kennyiseeyou","https://jaywcjlove.github.io/#/sponsor"],"categories":["UI and SwiftUI"],"sub_categories":[],"readme":"SwiftUI Markdown\n===\n\n[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)\n[![CI](https://github.com/jaywcjlove/markdown/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/markdown/actions/workflows/ci.yml)\n![SwiftUI Support](https://shields.io/badge/SwiftUI-macOS%20v10.15%20%7C%20iOS%20v13-green?logo=Swift\u0026style=flat)\n\nRender Markdown text in SwiftUI. It is a preview based on the [`Marked`](https://github.com/markedjs/marked) implementation.\n\n✦ My macOS/iOS application ✦\n\n\u003cp style=\"display: inline_block\"\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/focus-cursor/\" title=\"FocusCursor for macOS\"\u003e\u003cimg align=\"center\" alt=\"FocusCursor\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/d543668a-737b-4853-a6bb-eaa269e69836\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/videoer/\" title=\"Videoer for macOS\"\u003e\u003cimg align=\"center\" alt=\"Videoer\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/12c02a7a-109e-4048-91f4-ab2dfd1e264e\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/key-clicker/\" title=\"KeyClicker for macOS\"\u003e\u003cimg align=\"center\" alt=\"KeyClicker\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/5a19fcb9-cb81-4855-b4ea-31c604d9612a\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/daybar/\" title=\"DayBar for macOS\"\u003e\u003cimg align=\"center\" alt=\"DayBar\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/b67d4a2e-92e2-4d8c-8c6f-2a1eb3e2fa93\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/iconed/\" title=\"Iconed for macOS\"\u003e\u003cimg align=\"center\" alt=\"Iconed\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/8a35dc7b-4faf-4e2a-9311-f66d6844a896\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/rightmenu-master/\" title=\"RightMenu Master for macOS\"\u003e\u003cimg align=\"center\" alt=\"RightMenu Master\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/39a76541-71bf-4de7-a01c-c62f0557dff5\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/paste-quick/\" title=\"Paste Quick for macOS\"\u003e\u003cimg align=\"center\" alt=\"Quick RSS\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/bdaad5b7-9810-44ce-8f17-8410864465d2\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/quick-rss/\" title=\"Quick RSS for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Quick RSS\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/374106b5-a448-4d1d-9ccb-b04b6bc681ed\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/web-serve/\" title=\"Web Serve for macOS\"\u003e\u003cimg align=\"center\" alt=\"Web Serve\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/e1d9f76f-0f3d-4ba5-8a15-253ee173bb1c\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/copybook-generator/\" title=\"Copybook Generator for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Copybook Generator\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/b90e42ff-158b-4534-82ca-5898fd0e8d73\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/devtutor/\" title=\"DevTutor for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"DevTutor for SwiftUI\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/f15c154d-0192-48eb-8e0e-9e245ffd974a\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/regex-mate/\" title=\"RegexMate for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"RegexMate\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/aabe5aa9-9a96-4390-8bed-c3e4023d0dea\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/time-passage/\" title=\"Time Passage for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Time Passage\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/time-passage/assets/1680273/6f30e429-e6f3-4dbe-9921-a5effe2a05e9\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/IconizeFolder/\" title=\"IconizeFolder for macOS\"\u003e\u003cimg align=\"center\" alt=\"Iconize Folder\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/fa9d8b9c-1e51-4ded-877c-fa5b21c47220\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/TextSoundSaver/\" title=\"Textsound Saver for macOS/iOS\"\u003e\u003cimg align=\"center\" alt=\"Textsound Saver\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/0595e842-980b-4574-8891-a8ba853a08be\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/create-custom-symbols/\" title=\"Create Custom Symbols for macOS\"\u003e\u003cimg align=\"center\" alt=\"Create Custom Symbols\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/8cd022ce-a3f1-4e89-b7c6-6fbd0d4db77c\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/DevHub/\" title=\"DevHub for macOS\"\u003e\u003cimg align=\"center\" alt=\"DevHub\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/4a44a4fd-67ce-430b-af0a-72f18feaa47d\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/ResumeRevise/\" title=\"Resume Revise for macOS\"\u003e\u003cimg align=\"center\" alt=\"Resume Revise\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c9954a20-1905-48de-bdf8-d71837974aa2\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/palette-genius/\" title=\"Palette Genius for macOS\"\u003e\u003cimg align=\"center\" alt=\"Palette Genius\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/27340413-d355-45b2-8f6f-6ac37682d957\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/symbol-scribe/\" title=\"Symbol Scribe for macOS\"\u003e\u003cimg align=\"center\" alt=\"Symbol Scribe\" height=\"52\" width=\"52\" src=\"https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c7249f05-fa70-4def-a1e9-571d5f171fc9\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n\nhttps://user-images.githubusercontent.com/1680273/159059803-d844769b-36ad-44c1-a296-a657de8d099c.mov\n\n![Markdown Package Screenshot](https://user-images.githubusercontent.com/1680273/158006647-19d180e2-2549-4cd4-b108-91778beccc1b.png)\n\n![Markdown Package Screenshot](https://user-images.githubusercontent.com/1680273/158075575-14c9c942-5b99-479c-9935-b631bac3828e.png)\n\n![Markdown Package Screenshot](https://user-images.githubusercontent.com/1680273/158075581-925d267f-47ce-4468-b891-0fb2467b89df.png)\n\n## Installation\n\nYou can add MarkdownUI to an Xcode project by adding it as a package dependency.\n\n1. From the File menu, select Add Packages…\n2. Enter https://github.com/jaywcjlove/swiftui-markdown the Search or Enter Package URL search field\n3. Link `Markdown` to your application target\n\nOr add the following to `Package.swift`:\n\n```swift\n.package(url: \"https://github.com/jaywcjlove/swiftui-markdown\", from: \"1.0.0\")\n```\n\nOr [add the package in Xcode](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).\n\n## Usage\n\n```swift\nimport SwiftUI\nimport Markdown\n\nstruct ContentView: View {\n  @State private var mdStr: String = \"\"\"\n    ## Hello World\n    \n    Render Markdown text in SwiftUI.\n    \"\"\"\n  var body: some View {\n    VStack {\n      Markdown(content: $mdStr)\n      TextEditor(text: $mdStr)\n    }\n  }\n}\n```\n\n### `.markdownStyle()`\n\nSetting markdown related styles.\n\n```swift\nMarkdown(content: $mdStr)\n  .markdownStyle(\n      MarkdownStyle(\n        padding: 0, paddingTop: 115, paddingBottom: 2, paddingLeft: 130, paddingRight: 5\n      )\n  )\n```\n\n```swift\nMarkdown(content: $mdStr)\n  .markdownStyle(MarkdownStyle(padding: 35 ))\n```\n\n## Configure\n\n\u003cimg width=\"666\" alt=\"image\" src=\"https://user-images.githubusercontent.com/1680273/158029436-cb6eb339-f698-4dcd-9508-acda79683aba.png\"\u003e\n\n## Contributors\n\nAs always, thanks to our amazing contributors!\n\n\u003ca href=\"https://github.com/jaywcjlove/swiftui-markdown/graphs/contributors\"\u003e\n  \u003cimg src=\"https://jaywcjlove.github.io/swiftui-markdown/CONTRIBUTORS.svg\" /\u003e\n\u003c/a\u003e\n\nMade with [contributors](https://github.com/jaywcjlove/github-action-contributors).\n\n## License\n\nLicensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswiftui-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywcjlove%2Fswiftui-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswiftui-markdown/lists"}