No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit eed2b4a Jan 20, 2017
Permalink
Failed to load latest commit information.
.gitignore First commit Dec 6, 2015
README.md Updated docs with examples Dec 7, 2015
index.js fixed missing array Feb 6, 2016
package.json Fix typo in package.json Dec 5, 2016

README.md

react-native-web-container

A wrapper around the React Native WebView to add autoHeight and the ability to sanitize html using sanitize-html

Installation

npm install --save react-native-web-container

Usage

Example

import WebContainer from 'react-native-web-container';

class MyWebView extends React.Component {
  render() {
    let html = '';

    return (
      <WebContainer
        style={{flex: 1}}
        html={html}
        makeSafe={true}
        autoHeight={true} />
    );
  }
}

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)