{"id":13461770,"url":"https://github.com/danielsaidi/RichTextKit","last_synced_at":"2025-03-24T22:35:01.617Z","repository":{"id":37932058,"uuid":"490816086","full_name":"danielsaidi/RichTextKit","owner":"danielsaidi","description":"RichTextKit is a Swift SDK that helps you use rich text in Swift and SwiftUI.","archived":false,"fork":false,"pushed_at":"2025-01-02T09:31:40.000Z","size":6228,"stargazers_count":1062,"open_issues_count":55,"forks_count":133,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-22T17:04:20.318Z","etag":null,"topics":["appkit","ios","macos","rich-text","rich-text-editor","swift","swiftui","tvos","uikit","watchos"],"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/danielsaidi.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":{"github":["danielsaidi"]}},"created_at":"2022-05-10T18:28:15.000Z","updated_at":"2025-03-20T01:18:07.000Z","dependencies_parsed_at":"2023-10-12T21:17:51.347Z","dependency_job_id":"0eb6c2ba-5e7f-46d1-9b05-a6b5f180ae53","html_url":"https://github.com/danielsaidi/RichTextKit","commit_stats":{"total_commits":638,"total_committers":21,"mean_commits":30.38095238095238,"dds":0.2068965517241379,"last_synced_commit":"9d091e12d50c62d29fe99d2cdb901e31cb6dac1a"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FRichTextKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FRichTextKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FRichTextKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielsaidi%2FRichTextKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielsaidi","download_url":"https://codeload.github.com/danielsaidi/RichTextKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366204,"owners_count":20603438,"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":["appkit","ios","macos","rich-text","rich-text-editor","swift","swiftui","tvos","uikit","watchos"],"created_at":"2024-07-31T11:00:57.191Z","updated_at":"2025-03-24T22:34:56.602Z","avatar_url":"https://github.com/danielsaidi.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src =\"Resources/Logo_GitHub.png\" alt=\"RichTextKit Logo\" title=\"RichTextKit\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/danielsaidi/RichTextKit?color=%2300550\u0026sort=semver\" alt=\"Version\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-5.9-orange.svg\" alt=\"Swift 5.9\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platform-SwiftUI-blue.svg\" alt=\"Swift UI\" title=\"Swift UI\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/danielsaidi/RichTextKit\" alt=\"MIT License\" /\u003e\n    \u003ca href=\"https://twitter.com/danielsaidi\"\u003e\u003cimg src=\"https://img.shields.io/twitter/url?label=Twitter\u0026style=social\u0026url=https%3A%2F%2Ftwitter.com%2Fdanielsaidi\" alt=\"Twitter: @danielsaidi\" title=\"Twitter: @danielsaidi\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://mastodon.social/@danielsaidi\"\u003e\u003cimg src=\"https://img.shields.io/mastodon/follow/000253346?label=mastodon\u0026style=social\" alt=\"Mastodon: @danielsaidi@mastodon.social\" title=\"Mastodon: @danielsaidi@mastodon.social\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\n## About RichTextKit\n\nRichTextKit is a Swift SDK that lets you edit rich text in `Swift` \u0026 `SwiftUI` with a multi-platform `RichTextEditor`:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src =\"Resources/Demo.jpg\" /\u003e\n\u003c/p\u003e\n\nThe `RichTextEditor` supports text styles (bold, italic, underline, etc.), fonts, font sizes, colors, text alignments, image attachments, and much more. It's powered by a `RichTextView` that bridges `UITextView` \u0026 `NSTextView` and adds additional, platform-agnostic APIs that make the two views behave more alike.\n\nIf you just want to view rich text content, you can use the `RichTextViewer` SwiftUI view, which wraps the editor and applies a read-only configuration to it.\n\n\n\n## Installation\n\nRichTextKit can be installed with the Swift Package Manager:\n\n```\nhttps://github.com/danielsaidi/RichTextKit.git\n```\n\n\n\n## Getting started\n\nRichTextKit has a SwiftUI ``RichTextEditor`` that takes a text binding and a ``RichTextContext``:\n\n```swift\nstruct MyView: View {\n\n    @State\n    private var text = NSAttributedString(string: \"Type here...\")\n    \n    @StateObject\n    var context = RichTextContext()\n\n    var body: some View {\n        RichTextEditor(text: $text, context: context) {\n            // You can customize the native text view here\n        }\n        .focusedValue(\\.richTextContext, context)\n    }\n}\n```\n\nThe editor uses a ``RichTextCoordinator`` to sync changes between the editor, context, and platform-specific view. You can use the context to change font, colors, alignment etc. and observe context changes to update the UI.\n\nIf you just want to display rich text, you can use the ``RichTextViewer`` instead:\n\n```swift\nstruct MyView: View {\n\n    private var text = NSAttributedString(...)\n\n    var body: some View {\n        RichTextViewer(text: text)\n    }\n}\n```\n\nRichTextKit provides UI components, keyboard shortcuts \u0026 menu commands that can be used in a rich text editor.\n\nFor more information, please see the [getting started guide][Getting-Started].\n\n\n\n## Documentation\n\nThe [online documentation][Documentation] has more information, articles, code examples, etc.\n\n\n\n## Demo App \u0026 Inspiration\n\nThe RichTextKit demo lets you explore the library on iOS \u0026 macOS. To try it out, just open and run the `Demo` app.\n\nRichTextKit is also used in the following apps, so make sure to check them out for inspiration:\n\n\u003ca title=\"Chunk\" href=\"https://www.chunkapp.com\"\u003e\u003cimg src=\"Resources/apps/chunk.png\" width=100 /\u003e\u003c/a\u003e \n\u003ca title=\"Oribi Writer\" href=\"https://oribi.se/en\"\u003e\u003cimg src=\"Resources/apps/oribiwriter.png\" width=100 /\u003e\u003c/a\u003e\n\nDon't hesitate to reach out if you are using RichTextKit, and want to add your app to this list. I'd love to feature it.\n\n\n\n## Sponsor my work\n\nPlease consider supporting my work if you find this and my other [open-source projects][OpenSource] helpful. I manage them on my spare time, and any help to keep them going is greatly appreciated.\n\nYou can [sponsor me][Sponsors] on GitHub Sponsors, [reach out][Email] for paid support, or hire me for [freelance work][Website].\n\n\n\n## Contact\n\nFeel free to reach out if you have questions or want to contribute in any way:\n\n* Website: [danielsaidi.com][Website]\n* Mastodon: [@danielsaidi@mastodon.social][Mastodon]\n* Twitter: [@danielsaidi][Twitter]\n* E-mail: [daniel.saidi@gmail.com][Email]\n\n\n\n## License\n\nRichTextKit is available under the MIT license. See the [LICENSE][License] file for more info.\n\n\n\n[Email]: mailto:daniel.saidi@gmail.com\n\n[Website]: https://www.danielsaidi.com\n[GitHub]: https://www.github.com/danielsaidi\n[Twitter]: https://www.twitter.com/danielsaidi\n[Mastodon]: https://mastodon.social/@danielsaidi\n[Sponsors]: https://github.com/sponsors/danielsaidi\n[OpenSource]: https://www.danielsaidi.com/opensource\n\n[Documentation]: https://danielsaidi.github.io/RichTextKit/documentation/richtextkit/\n[Getting-Started]: https://danielsaidi.github.io/RichTextKit/documentation/richtextkit/getting-started\n[License]: https://github.com/danielsaidi/RichTextKit/blob/master/LICENSE\n","funding_links":["https://github.com/sponsors/danielsaidi"],"categories":["Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsaidi%2FRichTextKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielsaidi%2FRichTextKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielsaidi%2FRichTextKit/lists"}