{"id":16061234,"url":"https://github.com/krzyzanowskim/swiftui.textedit","last_synced_at":"2025-03-16T08:32:06.486Z","repository":{"id":89875251,"uuid":"362241403","full_name":"krzyzanowskim/SwiftUI.TextEdit","owner":"krzyzanowskim","description":"SwiftUI proof-of-concept text edit component","archived":false,"fork":false,"pushed_at":"2021-09-22T09:08:46.000Z","size":22,"stargazers_count":86,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-14T07:11:18.931Z","etag":null,"topics":["swiftui","swiftui-components","swiftui-example"],"latest_commit_sha":null,"homepage":"https://swift.best","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krzyzanowskim.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},"funding":{"github":["krzyzanowskim"]}},"created_at":"2021-04-27T20:24:56.000Z","updated_at":"2024-03-15T16:39:12.000Z","dependencies_parsed_at":"2023-07-29T22:26:49.333Z","dependency_job_id":null,"html_url":"https://github.com/krzyzanowskim/SwiftUI.TextEdit","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"576025d43d8a2501cb20e39f79415eda931583f7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSwiftUI.TextEdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSwiftUI.TextEdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSwiftUI.TextEdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzyzanowskim%2FSwiftUI.TextEdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krzyzanowskim","download_url":"https://codeload.github.com/krzyzanowskim/SwiftUI.TextEdit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806070,"owners_count":20350775,"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":["swiftui","swiftui-components","swiftui-example"],"created_at":"2024-10-09T04:08:14.964Z","updated_at":"2025-03-16T08:32:06.457Z","avatar_url":"https://github.com/krzyzanowskim.png","language":"Swift","funding_links":["https://github.com/sponsors/krzyzanowskim"],"categories":[],"sub_categories":[],"readme":"\n# SwiftUI TextEdit View\n\nA proof-of-concept text edit component in SwiftUI \u0026 CoreText. No UIKit, No AppKit, no UITextView/NSTextView/UITextField involved.\n\n*Note* Due to SwiftUI limitations (as of May 2021) it's not possible to handle keystrokes just with SwiftUI. To overcome this limitation, the `UIKeyboardViewController` is responsible for handling keys and forward to SwiftUI codebase.\n\nIf you have questions or want to reach to me, use this thread: https://twitter.com/krzyzanowskim/status/1269402396217745410\n\n## Authors\n\n[Marcin Krzyzanowski](http://krzyzanowskim.com)\n[@krzyzanowskim](https://twitter.com/krzyzanowskim)\n\n  \n## Screenshots\n\n![TextEdit 2021-05-03 19_00_33](https://user-images.githubusercontent.com/758033/116907452-de751980-ac41-11eb-9595-7a47f1e9a4fe.gif)\n\n\n  \n## Usage/Examples\n\n```swift\nstruct TextEditingView: View {\n    @State private var text = \"type here...\\n\"\n    @State private var font = UIFont.preferredFont(forTextStyle: .body) as CTFont\n    @State private var carretWidth = 2.0 as CGFloat\n\n    var body: some View {\n        TextEdit(\n            text: $text,\n            font: $font,\n            carretWidth: $carretWidth\n        )\n    }\n}\n```\n\n  \n## FAQ\n\n#### How?\n\nCoreText + SwiftUI.\n\n#### Why?\n\nFor fun and profit.\n\n  \n## Related\n\nHere are some related projects\n\n[CoreTextSwift](https://github.com/krzyzanowskim/CoreTextSwift)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzyzanowskim%2Fswiftui.textedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrzyzanowskim%2Fswiftui.textedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzyzanowskim%2Fswiftui.textedit/lists"}