{"id":15037789,"url":"https://github.com/tuesleep/leotextview","last_synced_at":"2026-02-13T22:21:27.127Z","repository":{"id":56918366,"uuid":"57216686","full_name":"tuesleep/LEOTextView","owner":"tuesleep","description":"🐬A high-performance rich editor develop with swift on iOS platform, based on TextKit.","archived":false,"fork":false,"pushed_at":"2023-07-14T13:02:58.000Z","size":25201,"stargazers_count":107,"open_issues_count":6,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-13T06:19:26.862Z","etag":null,"topics":["rich-text-editor","swift-3","textkit","textview"],"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/tuesleep.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":"2016-04-27T13:45:26.000Z","updated_at":"2025-07-04T05:44:11.000Z","dependencies_parsed_at":"2024-09-28T22:01:11.018Z","dependency_job_id":"9cde343f-5433-405f-9cd5-b7f7a6b52756","html_url":"https://github.com/tuesleep/LEOTextView","commit_stats":null,"previous_names":["leonardo-hammer/leotextview","chanricle/ncktextview"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/tuesleep/LEOTextView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuesleep%2FLEOTextView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuesleep%2FLEOTextView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuesleep%2FLEOTextView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuesleep%2FLEOTextView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuesleep","download_url":"https://codeload.github.com/tuesleep/LEOTextView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuesleep%2FLEOTextView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274229375,"owners_count":25245188,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["rich-text-editor","swift-3","textkit","textview"],"created_at":"2024-09-24T20:35:44.270Z","updated_at":"2025-12-12T06:26:14.280Z","avatar_url":"https://github.com/tuesleep.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LEOTextView\n\n[![CI Status](http://img.shields.io/travis/leonardo-hammer/LEOTextView.svg?style=flat)](https://travis-ci.org/leonardo-hammer/LEOTextView)\n[![Version](https://img.shields.io/cocoapods/v/LEOTextView.svg?style=flat)](http://cocoapods.org/pods/LEOTextView)\n[![License](https://img.shields.io/cocoapods/l/LEOTextView.svg?style=flat)](http://cocoapods.org/pods/LEOTextView)\n[![Platform](https://img.shields.io/cocoapods/p/LEOTextView.svg?style=flat)](http://cocoapods.org/pods/LEOTextView)\n\nLEOTextView is a **very high-performance** rich editor. Because it's a **subclass of UITextView**, not UIWebView. All of code by **TextKit** framework.\n\n## Features\n\n* Bold Text\n* Italic Text\n* Unordered List\n* Ordered List\n* List auto indentation\n* Undo and Redo\n* Rich Text Copy \u0026 Paste\n\n## Requirements\n\nXcode 8.3 or newer\n\nTag       | Swift\n--------  | -----\n\u003c= 0.4.x  | 2.2\n\\\u003e= 0.5.0  | 3.0\n\\\u003e= 0.7.0  | 4.0\n\n## Usage\n\nNot extends any class, not EditorController and so on...\n\nYou can embed LEOTextView to anywhere that you want.\n\n```swift\n// Init TextView\nlet textView = LEOTextView(frame: self.view.bounds, textContainer: NSTextContainer())\n\n// If you want to use built-in toolbar, call it.\ntextView.enableToolbar()\n\n// add to View\nself.view.addSubview(textView)\n```\n\nDone.\n\n## UITextViewDelegate\n\nSome feature I use delegate method, so LEOTextView is delegate self. And provide another delegate property named `leo_delegate`\n\n```swift\npublic var leo_delegate: UITextViewDelegate?\n```\n\n## Public methods\n\n#### Type transform\n\n```swift\npublic func changeCurrentParagraphTextWithInputFontMode(mode: LEOInputFontMode)\npublic func changeSelectedTextWithInputFontMode(mode: LEOInputFontMode)\n\npublic func changeCurrentParagraphToOrderedList(orderedList isOrderedList: Bool, listPrefix: String)\n```\n\n#### Text attributes persistent\n\nGet JSON by\n```swift\npublic func textAttributesJSON() -\u003e String\n```\n\nThis method return a JSON string that contains all attributes needs to reload.\n\nA unordered list \n- A\n- B\n- C\n\nconvert to JSON look like:\n\n```json\n{\n  \"text\": \"- A\\n- B\\n- C\",\n  \"attributes\": [\n  {\n    \"location\": 0,\n    \"length\": 11,\n    \"fontType\": \"normal\",\n    \"name\": \"NSFont\"\n  },\n  {\n    \"location\": 0,\n    \"length\": 11,\n    \"listType\": 3,\n    \"name\": \"NSParagraphStyle\"\n  }\n  ]\n}\n```\n\nSet JSON and display to UITextView by\n```swift\npublic func setAttributeTextWithJSONString(jsonString: String)\n```\n\nOr just set attributes only by\n```swift\npublic func setAttributesWithJSONString(jsonString: String)\n```\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\n### Cocoapods\n\nLEOTextView is available through CocoaPods. To install it, simply add the following line to your Podfile:\n\n```ruby\npod \"LEOTextView\"\n```\n\n## Author\n\nTuesleep, tuesleep@gmail.com\n\n## License\n\nLEOTextView is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuesleep%2Fleotextview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuesleep%2Fleotextview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuesleep%2Fleotextview/lists"}