Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danrigsby/react-native-web-container
https://github.com/danrigsby/react-native-web-container
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/danrigsby/react-native-web-container
- Owner: danrigsby
- Created: 2015-12-06T21:08:42.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-20T14:15:44.000Z (almost 8 years ago)
- Last Synced: 2024-09-07T08:18:23.722Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 45
- Watchers: 2
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-react-native - react-native-web-container ★36 - A wrapper around the react native WebView to add autoHeight, scrub html, etc (Components / Web)
- awesome-react-native - react-native-web-container ★36 - A wrapper around the react native WebView to add autoHeight, scrub html, etc (Components / Web)
- awesome-react-native - react-native-web-container ★36 - A wrapper around the react native WebView to add autoHeight, scrub html, etc (Components / Web)
- awesome-react-native-ui - react-native-web-container ★13 - A wrapper around the react native WebView to add autoHeight, scrub html, etc (Components / Web)
- awesome-react-native - react-native-web-container ★36 - A wrapper around the react native WebView to add autoHeight, scrub html, etc (Components / Web)
README
# react-native-web-container
A wrapper around the React Native WebView to add autoHeight and the ability to sanitize html using [sanitize-html](https://github.com/punkave/sanitize-html)
## Installation
> npm install --save react-native-web-container## Usage
### Example
```javascript
import WebContainer from 'react-native-web-container';class MyWebView extends React.Component {
render() {
let html = '';return (
);
}
}
```
### Properties
| option | values |
|---|---|
| autoHeight | (default: `false`) automatically set the height of the WebView to fill the contains and remove the scroll bar |
| makeSafe | (default: `false`) `false`: will not modify the html, `true`: will sanitize the html using the build in defaults, `object`: define a custom configuration for how to sanitize the html (See [docs](https://github.com/punkave/sanitize-html#how-to-use))