{"id":20635949,"url":"https://github.com/lele8446/cjtextview","last_synced_at":"2025-06-17T11:39:45.533Z","repository":{"id":51971297,"uuid":"61987197","full_name":"lele8446/CJTextView","owner":"lele8446","description":"富文本编辑与显示类。CJUITextView提示默认提示语，动态改变高度，插入特殊文本。CJDisplayTextView支持富文本显示，可自动识别网址、日期、地址、电话以及自定义链点","archived":false,"fork":false,"pushed_at":"2022-05-26T10:16:58.000Z","size":977,"stargazers_count":25,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T05:02:31.438Z","etag":null,"topics":["attributes","ios","objective-c","textview","uikit"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/lele8446.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-26T12:02:05.000Z","updated_at":"2024-06-06T06:54:46.000Z","dependencies_parsed_at":"2022-08-20T19:20:30.564Z","dependency_job_id":null,"html_url":"https://github.com/lele8446/CJTextView","commit_stats":null,"previous_names":["lele8446/textviewdemo"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/lele8446/CJTextView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lele8446%2FCJTextView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lele8446%2FCJTextView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lele8446%2FCJTextView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lele8446%2FCJTextView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lele8446","download_url":"https://codeload.github.com/lele8446/CJTextView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lele8446%2FCJTextView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260350670,"owners_count":22995794,"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":["attributes","ios","objective-c","textview","uikit"],"created_at":"2024-11-16T15:08:17.730Z","updated_at":"2025-06-17T11:39:40.510Z","avatar_url":"https://github.com/lele8446.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"**注意**\n\n***V2.0.0 版本新增CJDisplayTextView，提供富文本显示功能，可自动识别网址、日期、地址、电话以及添加自定义点击链点。\u003cbr/\u003e\n引入CJTextViewModel，CJUITextView插入特殊文本改用:\u003cbr/\u003e\n`-insertSpecialText:(CJTextViewModel *)textModel atIndex:(NSUInteger)loc`方法，\u003cbr/\u003e\n同时优化了内部实现。***\n\n##### 效果图\n![](http://7xnrwl.com1.z0.glb.clouddn.com/CJTextView.gif)\n\n## CJTextView简介\n自定义UITextView：\n* 1、可设置placeHold默认提示语；\n* 2、高度自动改变（autoLayoutHeight）设置，开启后TextView高度可根据输入内容动态调整\n* 3、支持插入特殊文本，比如 @人名 、#主题#，同时设置插入文本是否可编辑，插入文本可携带自定义参数\n* 4、TextView输入内容，可通过 `-allTextModel` 等相关方法建模输出\u003cbr/\u003e\n\n## CJDisplayTextView简介\nCJDisplayTextView功能概要：\n* 1、只支持浏览模式，不允许编辑。\n* 2、可以根据显示内容动态调整高度，并自动识别网址、日期、地址、电话，点击则触发系统默认行为；\n* 3、允许插入自定义点击链点，自定义链点请通过类方法`+linkStr:attributes:parameter:`生成，点击自定义链点会触发点击回调block和长按回调（长按只支持iOS10之后的系统）。\n\n## 如何使用\n### 文件引用\n下载demo后直接把CJUITextView文件夹添加到项目中\n\u003cbr /\u003e\n### cocoapods安装\n* Podfile\u003cbr/\u003e\n```ruby\nplatform :ios, '7.0'\npod 'CJTextView', '~\u003e 2.0.0'\n```\n\n## 更新日志\n* V2.0.0\u003cbr/\u003e\n优化内部实现，修复已知的一些问题。\n新增CJDisplayTextView，提供富文本显示功能，可自动识别网址、日期、地址、电话以及添加自定义点击链点。\n引入CJTextViewModel，插入与显示富文本均通过CJTextViewModel实现\n* V1.0.0\u003cbr/\u003e\n解决光标跳到问题\n* V0.0.9\u003cbr/\u003e\n修复语音输入空白语音的错误\n* V0.0.8\u003cbr/\u003e\n修复iOS9以下系统的KVO问题\n* V0.0.7\u003cbr/\u003e\n插入特殊字符判空处理\n* V0.0.6\u003cbr/\u003e\n增加`CJUITextView:placeHoldLabelHidden:`以及`CJUITextView:changeSelectedRange:`回调\n* V0.0.5\u003cbr/\u003e\n设置默认字体\n* V0.0.3、V0.0.4\u003cbr/\u003e\n修复KVO监测问题\n* V0.0.2\u003cbr/\u003e\n修复移除KVO监测的bug，添加placeHoldContainerInset设置\n* V0.0.1\u003cbr/\u003e\n发布版本，支持：1、添加placeHold提示；2、输入时可插入不可编辑的自定义文本（如＃主题＃，@人名）；3、UITextView高度可根据输入内容动态调整\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flele8446%2Fcjtextview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flele8446%2Fcjtextview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flele8446%2Fcjtextview/lists"}