{"id":15674440,"url":"https://github.com/jaywcjlove/swiftui-texteditor","last_synced_at":"2025-05-06T22:58:14.518Z","repository":{"id":229700999,"uuid":"777419059","full_name":"jaywcjlove/swiftui-texteditor","owner":"jaywcjlove","description":"An enhanced version similar to `TextEditor`, aimed at maintaining consistency in its usage across iOS and macOS platforms.","archived":false,"fork":false,"pushed_at":"2025-04-28T14:39:42.000Z","size":1836,"stargazers_count":30,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-29T16:28:22.496Z","etag":null,"topics":["ios","macos","swift","swift-package-manager","swiftui","swiftui-package","texteditor"],"latest_commit_sha":null,"homepage":"https://wangchujiang.com/swiftui-texteditor/documentation/texteditorplus/texteditorplus","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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,"zenodo":null},"funding":{"ko_fi":"jaywcjlove","buy_me_a_coffee":"jaywcjlove","custom":["https://www.paypal.me/kennyiseeyou","https://jaywcjlove.github.io/#/sponsor"]}},"created_at":"2024-03-25T20:19:17.000Z","updated_at":"2025-04-28T14:39:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0eb141d-7750-43f2-a275-4266cccc39d2","html_url":"https://github.com/jaywcjlove/swiftui-texteditor","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.05882352941176472,"last_synced_commit":"72d943c32a07950fa869d4b39923ba634a49c90a"},"previous_names":["jaywcjlove/swiftui-texteditor"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-texteditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-texteditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-texteditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywcjlove%2Fswiftui-texteditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaywcjlove","download_url":"https://codeload.github.com/jaywcjlove/swiftui-texteditor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252278099,"owners_count":21722654,"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","swift","swift-package-manager","swiftui","swiftui-package","texteditor"],"created_at":"2024-10-03T15:44:47.594Z","updated_at":"2025-05-06T22:58:14.510Z","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 TextEditorPlus\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/swiftui-texteditor/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/swiftui-texteditor/actions/workflows/ci.yml)\n[![SwiftUI Support](https://shields.io/badge/SwiftUI-macOS%20v11%20%7C%20iOS%20v13-green?logo=Swift\u0026style=flat)](https://swiftpackageindex.com/jaywcjlove/swiftui-texteditor)\n\nAn enhanced version similar to `TextEditor`, aimed at maintaining consistency in its usage across iOS and macOS platforms.\n\n✦ My macOS/iOS application ✦\n\n\u003cp style=\"display: inline_block\"\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/audioer/\" title=\"Audioer for macOS\"\u003e\u003cimg align=\"center\" alt=\"Audioer\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/7a836865-8c90-4119-87bc-19e06a76c957\"\u003e\u003c/a\u003e\n    \u003ca target=\"_blank\" href=\"https://wangchujiang.com/file-sentinel/\" title=\"FileSentinel for macOS\"\u003e\u003cimg align=\"center\" alt=\"FileSentinel\" height=\"52\" width=\"52\" src=\"https://github.com/user-attachments/assets/28bce2cc-290e-45bf-9068-585ff6ecafe9\"\u003e\u003c/a\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\nWelcome to download [DevTutor](https://apps.apple.com/app/devtutor/id6471227008), a cheat sheet app designed to help developers quickly build excellent applications using SwiftUI.\n\n\u003cp\u003e\n  \u003ca target=\"_blank\" href=\"https://apps.apple.com/app/devtutor/id6471227008\" title=\"DevTutor for SwiftUI AppStore\"\u003e\u003cimg alt=\"DevTutor for SwiftUI AppStore\" src=\"https://jaywcjlove.github.io/sb/download/macos.svg\" height=\"51\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\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-texteditor 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-texteditor\", 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 TextEditorPlus\n\nstruct ContentView: View {\n    @State var text = \"\"\"\n    Hello World\n    \"\"\"\n    @State var isEditable = true\n    var body: some View {\n        TextEditorPlus(text: $text)\n            .textSetting(isEditable, for: .isEditable)\n    }\n}\n```\n\nSet text weight and size:\n\n```swift\nTextEditorPlus(text: $text)\n    .font(.systemFont(ofSize: 24, weight: .regular))\n```\n\nSet editor padding:\n\n```swift\nTextEditorPlus(text: $text)\n  .textSetting(23, for: .insetPadding)\n```\n\nSet editor background color:\n\n```swift\nTextEditorPlus(text: $text)\n  .textSetting(NSColor.red, for: .backgroundColor)\n```\n\nSet editor text color:\n\n```swift\nTextEditorPlus(text: $text)\n  .textSetting(NSColor.red, for: .textColor)\n```\n\nSet editor placeholder string:\n\n```swift\nTextEditorPlus(text: $text)\n    //.font(NSFont(name: \"pencontrol\", size: 12)!)\n    .font(.systemFont(ofSize: CGFloat(Float(fontSize)!), weight: .regular))\n    .textSetting(\"Test placeholder string\", for: .placeholderString)\n```\n\nManipulate attributed strings with attributes such as visual styles, hyperlinks, or accessibility data for portions of the text.\n\n```swift\nTextEditorPlus(text: $text)\n    .textSetting(isEditable, for: .isEditable)\n    .textViewAttributedString(action: { val in\n            let style = NSMutableParagraphStyle()\n            style.lineSpacing = 5\n            style.lineHeightMultiple = 1.2\n            val.addAttribute(.paragraphStyle, value: style, range: NSRange(location: 0, length: val.length))\n            return val\n    })\n````\n\n## License\n\nLicensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswiftui-texteditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywcjlove%2Fswiftui-texteditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywcjlove%2Fswiftui-texteditor/lists"}