{"id":25457309,"url":"https://github.com/oneten19/phtexteditor","last_synced_at":"2026-02-13T13:02:57.360Z","repository":{"id":275792074,"uuid":"927226422","full_name":"OneTen19/PHTextEditor","owner":"OneTen19","description":"✨ SwiftUI TextEditor with Placeholder and additional customization options.","archived":false,"fork":false,"pushed_at":"2025-02-16T14:15:25.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T14:43:49.079Z","etag":null,"topics":["border","maxlength","placeholder","swiftui","texteditor"],"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/OneTen19.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-02-04T16:03:33.000Z","updated_at":"2025-02-16T14:14:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c71687a-e20a-47c3-a6e2-44fb079c66ef","html_url":"https://github.com/OneTen19/PHTextEditor","commit_stats":null,"previous_names":["oneten19/phtexteditor"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneTen19%2FPHTextEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneTen19%2FPHTextEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneTen19%2FPHTextEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneTen19%2FPHTextEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OneTen19","download_url":"https://codeload.github.com/OneTen19/PHTextEditor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239394714,"owners_count":19631122,"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":["border","maxlength","placeholder","swiftui","texteditor"],"created_at":"2025-02-18T02:17:00.193Z","updated_at":"2025-11-02T12:30:30.041Z","avatar_url":"https://github.com/OneTen19.png","language":"Swift","readme":"# PHTextEditor\n\n![Swift](https://img.shields.io/badge/SwiftUI-6.0-orange.svg)\n[![Swift Package Manager](https://img.shields.io/badge/SPM-Compatible-brightgreen.svg)](https://swift.org/package-manager/)\n\n\n✨ A SwiftUI `TextEditor` with `placeholder` and more customization options.\n\n## At a Glance\n\nEasily add a placeholder to `TextEditor` in SwiftUI while customizing its appearance.\n\n```swift\nimport SwiftUI\nimport PHTextEditor\n\nstruct ContentView: View {\n    @State private var text: String = \"\"\n    \n    var body: some View {\n        PHTextEditor(placeholder: \"Enter your text...\", text: $text)\n            .configure(\n                maxLength: 250,\n                placeholderColor: .gray,\n                border: .blue,\n                borderWidth: 2,\n                borderRadius: 8,\n                textPadding: EdgeInsets(top: 12, leading: 16, bottom: 12, trailing: 16)\n            )\n            .frame(height: 150)\n    }\n}\n```\n\nThis provides a seamless way to enhance `TextEditor` by displaying a placeholder when the text is empty and customizing styles.\n\n## Features\n\n- ✅ Supports SwiftUI `TextEditor`\n- ✅ Customizable placeholder text and color\n- ✅ Supports maximum text length\n- ✅ Customizable border and padding\n- ✅ Lightweight and easy to integrate\n- ✅ Works with Swift Package Manager (SPM)\n\n## Installation\n\n### **Using Swift Package Manager (SPM)**\n1. Open Xcode and go to **File \u003e Add Packages**.\n2. Enter the repository URL:\n\n```\nhttps://github.com/OneTen19/PHTextEditor.git\n```\n\n3. Choose **Add Package** and start using `PHTextEditor`!\n\n## Real World Example\n\nHere's an example usage in a SwiftUI app:\n\n```swift\nimport SwiftUI\nimport PHTextEditor\n\nstruct NoteView: View {\n    @State private var note: String = \"\"\n    \n    var body: some View {\n        VStack {\n            PHTextEditor(placeholder: \"Write your notes here...\", text: $note)\n                .configure(\n                    maxLength: 200,\n                    placeholderColor: .gray,\n                    border: .red,\n                    borderWidth: 2,\n                    borderRadius: 10,\n                    textPadding: EdgeInsets(top: 10, leading: 12, bottom: 10, trailing: 12)\n                )\n                .frame(height: 200)\n                .padding()\n        }\n        .padding()\n    }\n}\n```\n\n## License\n\n**PHTextEditor** is under the MIT license. See the [LICENSE](LICENSE) file for more details.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneten19%2Fphtexteditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foneten19%2Fphtexteditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneten19%2Fphtexteditor/lists"}