{"id":15288654,"url":"https://github.com/canopas/rich-editor-swiftui","last_synced_at":"2025-04-09T22:18:02.105Z","repository":{"id":217645423,"uuid":"703445424","full_name":"canopas/rich-editor-swiftui","owner":"canopas","description":"Powerful WYSIWYG Rich editor for SwiftUI.","archived":false,"fork":false,"pushed_at":"2025-01-21T11:31:36.000Z","size":10085,"stargazers_count":204,"open_issues_count":4,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T22:17:58.156Z","etag":null,"topics":["appkit","editor","ios","ios-swift","macos","rich-text-editor","richtext","string","swift","swiftui","swiftui-example","text-editor","text-formating","text-formatter","tvos","uikit","watchos"],"latest_commit_sha":null,"homepage":"https://canopas.github.io/rich-editor-swiftui/","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/canopas.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}},"created_at":"2023-10-11T09:01:14.000Z","updated_at":"2025-03-28T17:58:18.000Z","dependencies_parsed_at":"2024-02-22T10:47:01.724Z","dependency_job_id":"697acbf2-a2a0-45d9-8246-6bfd94b4e027","html_url":"https://github.com/canopas/rich-editor-swiftui","commit_stats":null,"previous_names":["canopas/rich-editor-swiftui"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Frich-editor-swiftui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Frich-editor-swiftui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Frich-editor-swiftui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Frich-editor-swiftui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canopas","download_url":"https://codeload.github.com/canopas/rich-editor-swiftui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119286,"owners_count":21050755,"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","editor","ios","ios-swift","macos","rich-text-editor","richtext","string","swift","swiftui","swiftui-example","text-editor","text-formating","text-formatter","tvos","uikit","watchos"],"created_at":"2024-09-30T15:51:50.990Z","updated_at":"2025-04-09T22:18:02.050Z","avatar_url":"https://github.com/canopas.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg width=\"930\" alt=\"mobile apps banner\" src=\"https://github.com/canopas/rich-editor-swiftui/assets/73588408/84c94bbd-7952-45cb-9bfb-95e0687b37b0\"\u003e\n\n# RichEditorSwiftUI\n[![Swift](https://img.shields.io/badge/Swift-5.9-orange?style=flat-square)](https://img.shields.io/badge/Swift-5.9-Orange?style=flat-square)\n[![Platforms](https://img.shields.io/badge/Platforms-macOS_iOS_tvOS_watchOS_visionOS-yellowgreen?style=flat-square)](https://img.shields.io/badge/Platforms-macOS_iOS_tvOS_watchOS_vision_OS_-Green?style=flat-square)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/RichEditorSwiftUI.svg?style=flat-square)](https://img.shields.io/cocoapods/v/RichEditorSwiftUI.svg)\n[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)\n\n![RichEditorSwiftUI (1)](https://github.com/canopas/rich-editor-swiftui/assets/73588408/8c3013ae-8a27-4ebc-a511-51e726825c4b)\n\n## Features\n\nThe editor offers the following \u003cb\u003eoptions\u003c/b\u003e:\n\n- [x] **Bold**\n- [x] *Italic*\n- [x] \u003cu\u003eUnderline\u003c/u\u003e\n- [x] ~~Strikethrough~~\n- [x] Different Heading\n- [x] Text Alignment\n- [x] Font size\n- [x] Font color\n- [x] Font family\n- [x] Background color\n- [x] Export with .txt, .rtf, .pdf, .json\n- [ ] Link\n- [ ] Image Attachment\n- [ ] Undo/Redo\n\n## What’s Coming Next for RichEditorSwiftUI?🚀\n\nWe’re thrilled about the future of **RichEditorSwiftUI!** 🎉 Check out the exciting features currently in development:\n\n- **Link Support:** Easily add hyperlinks to your rich text content.\n- **Image Drop:** Drag and drop images directly into your editor for seamless integration.\n- **Undo \u0026 Redo:** Effortlessly step forward or backward in your edits for greater control.\n\nThank you for your support and feedback—it fuels our journey. Stay tuned for these enhancements and more! 🙌\n\n## Screenshots\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth width=\"33%\" \u003eEditor light\u003c/th\u003e\n    \u003cth  width=\"33%\" \u003eEditor dark\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/editor_iphone_light.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003e \u003cimg src=\"docs/editor_iphone_dark.png\" /\u003e \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth width=\"33%\" \u003eToolbar dark\u003c/th\u003e\n    \u003cth  width=\"33%\" \u003eToolbar light\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/editor_toolbar_iphone_dark.png\" /\u003e\u003c/td\u003e\n    \u003ctd\u003e \u003cimg src=\"docs/editor_toolbar_iphone_light.png\" /\u003e \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth width=\"100%\" \u003emac Editor light\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/editor_mac_light.png\"  width=\"70%\" /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth  width=\"100%\" \u003emac Editor dark\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\n    \u003ctd\u003e \u003cimg src=\"docs/editor_mac_dark.png\"  width=\"70%\" /\u003e \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## mac Editor video\n\n\u003cdiv align=\"center\"\u003e\n  \u003cvideo src=\"https://github.com/user-attachments/assets/844d8843-41e9-44c2-8a0c-afedaa55c5cb\" width=\"90%\"/\u003e\n\u003c/div\u003e\n\n## iPhone Editor video\n\u003cdiv align=\"center\"\u003e\n  \u003cvideo src=\"https://github.com/user-attachments/assets/f99804fb-8612-4e46-b172-66567d1acf91\" width=\"90%\"/\u003e\n\u003c/div\u003e\n\n## Installation\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. \n\nOnce you have your Swift package set up, adding RichEditorSwiftUI as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/canopas/rich-editor-swiftui.git\", .upToNextMajor(from: \"1.1.0\"))\n]\n```\n\n### CocoaPods\n\n[CocoaPods][] is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate RichEditorSwiftUI into your Xcode project using CocoaPods, specify it in your Podfile:\n\n    target 'YourAppName' do\n        pod 'RichEditorSwiftUI', '~\u003e 1.1.1'\n    end\n\n[CocoaPods]: https://cocoapods.org\n\n## How to add in your project\n\nAdd the dependency\n\n```\n import RichEditorSwiftUI\n```\n\n## How to use?\n\n```\nstruct EditorView: View {\n    @ObservedObject var state: RichEditorState = .init(input: \"Hello World\")\n\n    var body: some View {\n        VStack {\n            #if os(macOS)\n                RichTextFormat.Toolbar(context: state)\n            #endif\n\n            RichTextEditor(\n                context: _state,\n                viewConfiguration: { _ in\n\n                }\n            )\n            .cornerRadius(10)\n\n            #if os(iOS)\n                RichTextKeyboardToolbar(\n                    context: state,\n                    leadingButtons: { $0 },\n                    trailingButtons: { $0 },\n                    formatSheet: { $0 }\n                )\n            #endif\n        }\n        .inspector(isPresented: $isInspectorPresented) {\n            RichTextFormat.Sidebar(context: state)\n                #if os(macOS)\n                    .inspectorColumnWidth(min: 200, ideal: 200, max: 320)\n                #endif\n        }\n    }\n}\n```\n# Demo\n[Sample](https://github.com/canopas/rich-editor-swiftui/tree/main/RichEditorDemo) app demonstrates how simple the usage of the library actually is.\n\n## Tech stack\n\nRichEditorSwiftUI utilizes the latest Apple technologies and adheres to industry best practices. Below is the current tech stack used in the development process:\n\n- MVVM Architecture\n- SwiftUI\n- Swift\n- Xcode\n\n## Contribution\n\nThe Canopas team enthusiastically welcomes contributions and project participation! There are a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.\n\n# Bugs and Feedback\nFor bugs, questions, and discussions please use the [Github Issues](https://github.com/canopas/rich-editor-swiftui/issues).\n\n## Credits\nRichEditor for SwiftUI is owned and maintained by the [Canopas team](https://canopas.com/). For project updates and releases, you can follow them on X at [@canopassoftware](https://x.com/canopassoftware).\n\nA similar library is also available for Android in Jetpack Compose [here](https://github.com/canopas/rich-editor-compose).\n\nRichTextKit: https://github.com/danielsaidi/RichTextKit\n\n\u003ca href=\"https://canopas.com/contact\"\u003e\u003cimg src=\"https://github.com/canopas/rich-editor-swiftui/assets/73588408/e03fe013-03e8-429d-828f-5066d3775258\" width=250\u003e\u003c/a\u003e\n\n# Licence\n\n```\nCopyright 2023 Canopas Software LLP\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nYou won't be using this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanopas%2Frich-editor-swiftui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanopas%2Frich-editor-swiftui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanopas%2Frich-editor-swiftui/lists"}