{"id":23709477,"url":"https://github.com/orzhtml/react-native-orzhtml-htmlview","last_synced_at":"2025-10-30T06:06:56.605Z","repository":{"id":57338845,"uuid":"198607857","full_name":"orzhtml/react-native-orzhtml-htmlview","owner":"orzhtml","description":"A React Native component which renders HTML content as native views","archived":false,"fork":false,"pushed_at":"2020-08-17T10:23:14.000Z","size":7441,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-19T16:05:41.310Z","etag":null,"topics":["android","fast-image","html","html-parser","html-renderer","htmlparser2","htmlview","image","ios","react","react-component","react-native","video","view"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/orzhtml.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}},"created_at":"2019-07-24T09:56:44.000Z","updated_at":"2022-07-11T15:03:04.000Z","dependencies_parsed_at":"2022-09-01T20:32:45.860Z","dependency_job_id":null,"html_url":"https://github.com/orzhtml/react-native-orzhtml-htmlview","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-htmlview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-htmlview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-htmlview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orzhtml%2Freact-native-orzhtml-htmlview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orzhtml","download_url":"https://codeload.github.com/orzhtml/react-native-orzhtml-htmlview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231872977,"owners_count":18439050,"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":["android","fast-image","html","html-parser","html-renderer","htmlparser2","htmlview","image","ios","react","react-component","react-native","video","view"],"created_at":"2024-12-30T18:30:54.343Z","updated_at":"2025-10-30T06:06:51.561Z","avatar_url":"https://github.com/orzhtml.png","language":"JavaScript","readme":"# react-native-orzhtml-htmlview\n\nA React Native component which renders HTML content as native views。\nWelcome everybody fork！！！\n\n## screenshots\n\n![](https://raw.githubusercontent.com/orzhtml/react-native-orzhtml-htmlview/master/screenshots/1.gif)\n\n\n## Install\n\n`npm install react-native-orzhtml-htmlview --save` or `yarn add react-native-orzhtml-htmlview`\n\n**For React Native 0.60.0 or higher.**\n\n`npm install react-native-fast-image --save` or `yarn add react-native-fast-image`\n\n`npm install teaset --save` or `yarn add teaset`\n\n**For React Native \u003c= 0.59.x use version 6.1.1 or lower**\n\n`npm install react-native-fast-image@6.1.1 --save` or `yarn add react-native-fast-image@6.1.1`\n\n`npm install teaset@0.6.3 --save` or `yarn add teaset@0.6.3`\n\n## Mostly automatic installation\n\n```\nreact-native link react-native-fast-image\n```\n\n## Example\n\nIn the react-native-orzhtml-htmlview package directory:\n\n```\ncd example\n\nnpm install // or yarn\n\nreact-native link\n```\n\nTo run example on iOS:\n\n`react-native run-ios`\n\nTo run example on Android:\n\n`react-native run-android`\n\n## Props\n\nProp | Description | Type | Required/Default\n------ | ------ | ------ | ------\n`onError`|错误|`func`|`console.error.bind(console)`\n`RootComponent`|根组件|`func`|`element =\u003e \u003cView {...element} /\u003e`\n`globalColor`|默认字体样式|`string`|`#222`\n`style`|父容器样式|`style`\n`stylesheet`|html标签样式|`object`\n`html`|html|`string`\n`fontSize`|字体大小|`string`|`normal`\n`imagesMaxWidth`|图片最大宽度|`number`|`Dimensions.get('window').width`\n`popover`|长按文本段落显示pop|`array`|`[]`\n`onImagePress`|点击图片|`func`|`() =\u003e {}`\n`onLongPress`|长按文本段落|`func`|`() =\u003e {}`\n`onMarkPress`|点击标记|`func`|`() =\u003e {}`\n`onVideoPlay`|点击视频回调|`func`|`() =\u003e {} / 返回视频 url 地址`\n`errorImgSource`|图片加载失败|`object`|`{ uri: 'https://reactnativecode.com/wp-content/uploads/2018/01/Error_Img.png' }`\n`debug`|调试模式|`bool`|`false`\n\n## 说明\n\n当前 v2.0.0 版本已经移除 video 组件，文章需要显示 video，只会显示 video 的 poster 图片，点击视频播放按钮，会返回视频的 url，在 example 里面有对应的例子。\n\n需要在文章内直接播放视频，请安装 v1.0.11 版本。","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forzhtml%2Freact-native-orzhtml-htmlview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forzhtml%2Freact-native-orzhtml-htmlview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forzhtml%2Freact-native-orzhtml-htmlview/lists"}