{"id":15105666,"url":"https://github.com/robertying/react-native-github-markdown","last_synced_at":"2025-09-27T05:30:48.926Z","repository":{"id":57337265,"uuid":"165398384","full_name":"robertying/react-native-github-markdown","owner":"robertying","description":"Generate GitHub Flavored Markdown (with syntax highlight) using React Native WebView","archived":true,"fork":false,"pushed_at":"2020-10-15T16:53:59.000Z","size":1473,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-21T13:04:48.911Z","etag":null,"topics":["github","highlighting","markdown","react","react-native","webview"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/robertying.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-01-12T14:42:37.000Z","updated_at":"2023-07-17T14:51:35.000Z","dependencies_parsed_at":"2022-09-10T02:51:27.417Z","dependency_job_id":null,"html_url":"https://github.com/robertying/react-native-github-markdown","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertying%2Freact-native-github-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertying%2Freact-native-github-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertying%2Freact-native-github-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertying%2Freact-native-github-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertying","download_url":"https://codeload.github.com/robertying/react-native-github-markdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871882,"owners_count":16554465,"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":["github","highlighting","markdown","react","react-native","webview"],"created_at":"2024-09-25T20:41:58.314Z","updated_at":"2025-09-27T05:30:43.517Z","avatar_url":"https://github.com/robertying.png","language":"TypeScript","readme":"# React Native Github Markdown\n\n![npm version](https://img.shields.io/npm/v/react-native-github-markdown)\n![npm download](https://img.shields.io/npm/dm/react-native-github-markdown)\n\nGenerate GitHub Flavored Markdown (with syntax highlight) using React Native WebView.\n\nScreenshot 📱 👇\n\n\u003cimg src=\"./screenshots/md-preview.jpg\" width=\"400\"\u003e\n\n## Features\n\n- Render GitHub Flavored Markdown on your React Native WebView.\n\n- Auto-height WebView adjusted to the document.\n\n- Code syntax highlighting.\n\n- Dark mode!\n\n## Install\n\n```shell\nnpm i react-native-github-markdown\n```\n\nor\n\n```shell\nyarn add react-native-github-markdown\n```\n\nYour React Native configuration should [support](https://github.com/react-native-community/react-native-webview#platforms-supported) [`react-native-webview`](https://github.com/react-native-community/react-native-webview).\n\n## Usage\n\n```jsx\nimport MarkdownWebView from 'react-native-github-markdown';\n\n\u003cMarkdownWebView\n  style={{marginTop: 10}}\n  content={'# React Native Github Markdown\\n\\nHello world!'}\n  highlight\n  darkMode\n/\u003e;\n```\n\n## Props\n\n- `defaultHeight`: default height when the actual height has not been computed.\n- `content`: raw markdown content to render.\n- `highlight`: whether to use `highlight.js` for syntax highlighting.\n- `darkMode`: whether to set rendered results in dark mode.\n\n---\n\n- `WebViewProps`: same as [`react-native-webview`'s](https://github.com/react-native-community/react-native-webview/blob/master/docs/Reference.md).\n\n## Caveats\n\n- I haven't found any working HTML sanitizer for React Native, so you should always treat unknown input source carefully. Do proper sanitization yourself if possible.\n- Code syntax highlighting seems odd for long code snippets. It's a problem with `highlight.js`. You can choose to disable it using the `highlight` prop.\n\n## Behind the Scene\n\n- Markdown generated by [marked](https://github.com/markedjs/marked) and use [DOMPurify](https://github.com/cure53/DOMPurify) for sanitizing.\n\n- Syntax highlighted by [highlight.js](https://github.com/highlightjs/highlight.js).\n\n- CSS from GitHub's [Primer](https://github.com/primer/css) and `highlight.js`.\n\n- Dark mode applied by [darkreader](https://github.com/darkreader/darkreader).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertying%2Freact-native-github-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertying%2Freact-native-github-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertying%2Freact-native-github-markdown/lists"}