{"id":13871923,"url":"https://github.com/shaps80/MarkdownText","last_synced_at":"2025-07-16T01:32:17.674Z","repository":{"id":59229757,"uuid":"533257973","full_name":"shaps80/MarkdownText","owner":"shaps80","description":"A native SwiftUI view for rendering Markdown text in an iOS or macOS app","archived":false,"fork":false,"pushed_at":"2023-08-13T10:35:51.000Z","size":270,"stargazers_count":148,"open_issues_count":3,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-09T18:51:50.266Z","etag":null,"topics":["ios","macos","markdown","swift","swiftui"],"latest_commit_sha":null,"homepage":"","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/shaps80.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":{"github":"shaps80","custom":"paypal.me/shapsuk"}},"created_at":"2022-09-06T09:44:37.000Z","updated_at":"2024-11-02T11:21:09.000Z","dependencies_parsed_at":"2024-10-11T13:22:11.175Z","dependency_job_id":null,"html_url":"https://github.com/shaps80/MarkdownText","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"82daa44352d2ac9e092252a8d98f482e4bfae837"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FMarkdownText","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FMarkdownText/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FMarkdownText/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FMarkdownText/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaps80","download_url":"https://codeload.github.com/shaps80/MarkdownText/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225110575,"owners_count":17422411,"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","swift","swiftui"],"created_at":"2024-08-05T23:00:30.409Z","updated_at":"2024-11-23T19:31:25.555Z","avatar_url":"https://github.com/shaps80.png","language":"Swift","readme":"![macOS](https://img.shields.io/badge/macOS-EE751F)\n![ios](https://img.shields.io/badge/iOS-0C62C7)\n[![swift](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fshaps80%2FMarkdownText%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/shaps80/MarkdownText)\n\n# MarkdownText\n\nA native SwiftUI view for rendering Markdown text in an iOS or macOS app.\n\n## Preview\n\n![Markdown Text Screenshot](Resources/screenshot.jpg)\n\n## Sponsor\n\nBuilding useful libraries like these, takes time away from my family. I build these tools in my spare time because I feel its important to give back to the community. Please consider [Sponsoring](https://github.com/sponsors/shaps80) me as it helps keep me working on useful libraries like these 😬\n\nYou can also give me a follow and a 'thanks' anytime.\n\n[![Twitter](https://img.shields.io/badge/Twitter-@shaps-4AC71B)](http://twitter.com/shaps)\n\n## Supported Markdown\n\n- Headings\n- Paragraphs\n- Quotes\n- Inline formatting\n    - Strong/Bold\n    - Emphasis/Italic\n    - Strikethrough\n    - Code\n    - Links (non interactive only)\n- Lists\n    - Ordered\n    - Unordered\n    - Checklist (GitHub style)\n- Thematic Breaks\n- Code Blocks\n- Images\n    - A full backport of `AsyncImage` is included\n    \n## Features\n\n**Style APIs**\n\nAdopting the familiar SwiftUI style-based APIs, you can customize the appearance of almost all markdown elements either individually or composed.\n\n```swift\nstruct CustomUnorderedBullets: UnorderedListBulletMarkdownStyle {\n    func makeBody(configuration: Configuration) -\u003e some View {\n        // you can also provide a completely new View if preferred 👍\n        configuration.label\n            .foregroundColor(.blue)\n    }\n}\n```\n\nYou can even customize animations since the library is composed of 100% SwiftUI elements only.\n\n```swift\nstruct ScaledImageStyle: ImageMarkdownStyle {\n    // image will scale up as its loaded, moving content out of the way\n    func makeBody(configuration: Configuration) -\u003e some View {\n        configuration.label\n            .transition(.scale)\n    }\n}\n```\n\nModifiers for styling and visibility can also be placed anywhere in your SwiftUI hierarchy, just as you'd expect:\n\n```\nNavigationView {\n    MarkdownText(markdown)\n}\n// Styling\n.markdownQuoteStyle(.inset)\n.markdownOrderedListBulletStyle(.tinted)\n.markdownImageStyle(.animated)\n\n// Visibility\n.markdownCode(.visible)\n.markdownThematicBreak(.hidden)\n```\n\n## Demo App\n\nA [MarkdownText Demo](https://github.com/shaps80/MarkdownTextDemo) is also available to better showcase the libraries capabilities.\n\n## Usage\n\nUsing the view couldn't be easier:\n\n```swift\nMarkdownText(\"Some **markdown** text\")\nLazyMarkdownText(someMassiveMarkdownText)\n```\n\nThere's even a `LazyMarkdownText` view that loads its view's lazily for those cases where you need improved scrolling and loading performance.\n\n## Installation\n\nYou can install manually (by copying the files in the `Sources` directory) or using Swift Package Manager (**preferred**)\n\nTo install using Swift Package Manager, add this to the `dependencies` section of your `Package.swift` file:\n\n`.package(url: \"https://github.com/shaps80/MarkdownText.git\", .upToNextMinor(from: \"1.0.0\"))`\n","funding_links":["https://github.com/sponsors/shaps80","paypal.me/shapsuk"],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaps80%2FMarkdownText","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaps80%2FMarkdownText","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaps80%2FMarkdownText/lists"}