{"id":13603995,"url":"https://github.com/ShaoGongBra/taro-html-view","last_synced_at":"2025-04-11T22:32:12.060Z","repository":{"id":47054379,"uuid":"497821717","full_name":"ShaoGongBra/taro-html-view","owner":"ShaoGongBra","description":"支持渲染由富文本编辑器编辑的html文本内容，支持小程序、h5、ReactNative，复杂的内容可能并不能正确渲染","archived":false,"fork":false,"pushed_at":"2022-12-08T09:16:57.000Z","size":55,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T20:44:42.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ShaoGongBra.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":"2022-05-30T06:45:30.000Z","updated_at":"2024-09-09T10:45:23.000Z","dependencies_parsed_at":"2023-01-25T09:45:12.769Z","dependency_job_id":null,"html_url":"https://github.com/ShaoGongBra/taro-html-view","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaoGongBra%2Ftaro-html-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaoGongBra%2Ftaro-html-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaoGongBra%2Ftaro-html-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShaoGongBra%2Ftaro-html-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShaoGongBra","download_url":"https://codeload.github.com/ShaoGongBra/taro-html-view/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489788,"owners_count":21112637,"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":[],"created_at":"2024-08-01T19:00:37.806Z","updated_at":"2025-04-11T22:32:11.773Z","avatar_url":"https://github.com/ShaoGongBra.png","language":"JavaScript","funding_links":[],"categories":["开源项目"],"sub_categories":["Taro3"],"readme":"# Taro HTML View\n支持将简单的html富文本渲染为Taro组件，支持小程序、H5、ReactNative\n\n## 安装\n\n```bash\nyarn add taro-html-view\n```\n\n## 使用\n\n```jsx\nimport { HtmlView } from 'taro-html-view'\n\n\u003cHtmlView html='\u003cp\u003e文本内容\u003c/p\u003e' /\u003e\n```\n\n## 属性\n\n|  属性   | 类型  | 说明 |\n|  ----  | ----  | ----  |\n| html  | string | 用于渲染的HTML |\n| previewImage  | boolean | 开启图片预览功能 |\n| onLinkClick  | function | 点击链接时回调，参数为 href 指向的地址 |\n| style  | CSSProperties | 用于组件最外层的样式 |\n| className  | string | class |\n\n## 说明\n- 支持小程序、H5、ReactNative\n- 只支持在Taro3上使用\n- 支持在小程序上渲染视频\n- 此组件的目的是渲染后台编辑器生成的内容，复杂或者ReactNative不支持的样式将不会被渲染\n\n## 已知问题\n- rn不支持 `line-height: 1.5;` 这样的倍数行距\n- 对em的单位转换不完善\n- rn不支持 `text-indent` 首行缩进\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShaoGongBra%2Ftaro-html-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FShaoGongBra%2Ftaro-html-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShaoGongBra%2Ftaro-html-view/lists"}