{"id":15028344,"url":"https://github.com/twitter/twittertexteditor","last_synced_at":"2025-05-15T03:08:19.062Z","repository":{"id":41156988,"uuid":"306473214","full_name":"twitter/TwitterTextEditor","owner":"twitter","description":"A standalone, flexible API that provides a full-featured rich text editor for iOS applications.","archived":false,"fork":false,"pushed_at":"2023-04-10T11:23:42.000Z","size":730,"stargazers_count":3008,"open_issues_count":10,"forks_count":172,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-05-15T03:08:11.124Z","etag":null,"topics":["ios","swift","textkit","uikit"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twitter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-22T22:33:29.000Z","updated_at":"2025-05-14T06:38:08.000Z","dependencies_parsed_at":"2022-07-14T08:31:25.710Z","dependency_job_id":"751d41a1-3ac6-4642-878c-667734078901","html_url":"https://github.com/twitter/TwitterTextEditor","commit_stats":{"total_commits":30,"total_committers":6,"mean_commits":5.0,"dds":"0.16666666666666663","last_synced_commit":"bfdecb52890dbb2554c08ad81773248dc567b323"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2FTwitterTextEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2FTwitterTextEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2FTwitterTextEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2FTwitterTextEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twitter","download_url":"https://codeload.github.com/twitter/TwitterTextEditor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264771,"owners_count":22041794,"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","swift","textkit","uikit"],"created_at":"2024-09-24T20:08:06.047Z","updated_at":"2025-05-15T03:08:14.053Z","avatar_url":"https://github.com/twitter.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter Text Editor\n\nA standalone, flexible API that provides a full featured rich text editor for iOS applications.\n\n![Twitter Text Editor](Sources/TwitterTextEditor/Documentation.docc/Resources/TwitterTextEditor.png)\n\nIt supports safe text modification, attribute annotations such as syntax highlighting, pasting or drag and drop handling.\n\nThis provides a robust text attribute update logic, extended text editing events, and safe text input event handling in easy delegate based APIs.\nTwitterTextEditor supports recent versions of iOS.\n\n\n## Requirements\n\nTwitter Text Editor requires macOS Catalina 10.15 or later and Xcode 11.0 and later for the development.\nAt this moment, Twitter Text Editor supports iOS 11.0 and later also macCatalyst 13.0 and later.\n\n\n## Usage\n\nUsing Twitter Text Editor is straightforward if you're familiar with iOS development. See\nalso [Examples](Examples/) for actual usage, that contains Swift and Objective-C source code\nto show how to use Twitter Text Editor. See [`Examples/README.md`](Examples/README.md) as well.\n\n### Add Twitter Text Editor framework to your project\n\nAdd the following lines to your `Package.swift` or use Xcode “Add Package Dependency…” menu.\n\n```swift\n// In your `Package.swift`\n\ndependencies: [\n    .package(name: \"TwitterTextEditor\", url: \"https://github.com/twitter/TwitterTextEditor\", ...),\n    ...\n],\ntargets: [\n    .target(\n        name: ...,\n        dependencies: [\n            .product(name: \"TwitterTextEditor\", package: \"TwitterTextEditor\"),\n            ...\n        ]\n    ),\n    ...\n]\n```\n\n### Use with other dependency management tools\n\nIn case your project is not using Swift Package Manager,\nyou can use Twitter Text Editor with other dependency management tools.\n\n#### CocoaPods\n\nTo use Twitter Text Editor with [CocoaPods](https://cocoapods.org/), add next `TwitterTextEditor.podspec` in your project.\n\n```ruby\nPod::Spec.new do |spec|\n  spec.name = \"TwitterTextEditor\"\n  spec.version = \"1.0.0\" # Find the the version from the Git tags\n  spec.authors = \"\"\n  spec.summary = \"TwitterTextEditor\"\n  spec.homepage = \"https://github.com/twitter/TwitterTextEditor\"\n  spec.platform = :ios, \"11.0\"\n  spec.source = {\n    :git =\u003e \"https://github.com/twitter/TwitterTextEditor.git\", :tag =\u003e \"#{spec.version}\"\n  }\n  spec.source_files  = \"Sources/TwitterTextEditor/*.swift\"\nend\n```\n\nThen, update `Podfile` in your project.\n\n```ruby\npod 'TwitterTextEditor', :podspec =\u003e 'path/to/TwitterTextEditor.podspec'\n```\n\n#### Carthage\n\nTo use Twitter Text Editor with [Carthage](https://github.com/Carthage/Carthage), update `Cartfile` in your project.\n\n```\ngithub \"twitter/TwitterTextEditor\"\n```\n\nThen, run following commands. This will create `Carthage/Build/iOS/TwitterTextEditor.framework`.\n\n```\n$ carthage update\n$ (cd Carthage/Checkouts/TwitterTextEditor \u0026\u0026 swift package generate-xcodeproj)\n$ carthage build --platform iOS\n```\n\nFollow [the instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos)\nto add the framework and Run Script phase to your project.\n\n### Documentation\n\nSee [documentation](https://twitter.github.io/TwitterTextEditor/documentation/twittertexteditor).\n\n\n## Use Twitter Text Editor in your project\n\nTwitter Text Editor provides a single view, `TextEditorView`, that has a similar API\nto `UITextView` and provides the most of features as a property or a delegate callback.\n\nAdd it to your project as like the other views, and setup using each property or implement delegate callbacks.\n\n```swift\n// In your view controller\n\nimport TwitterTextEditor\n\nfinal class MyViewController: UIViewController {\n    // ...\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        // ...\n        let textEditorView = TextEditorView()\n        textEditorView.text = \"Meow\"\n        textEditorView.textAttributesDelegate = self\n        // ...\n    }\n\n    // ...\n}\n\nextension MyViewController: TextEditorViewTextAttributesDelegate {\n    func textEditorView(_ textEditorView: TextEditorView,\n                        updateAttributedString attributedString: NSAttributedString,\n                        completion: @escaping (NSAttributedString?) -\u003e Void)\n    {\n        // ...\n    }\n}\n```\n\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the details.\n\n\n## Security issues\n\nPlease report sensitive security issues via [Twitter’s bug-bounty program](https://hackerone.com/twitter) rather than GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitter%2Ftwittertexteditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwitter%2Ftwittertexteditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitter%2Ftwittertexteditor/lists"}