Skip to content

Commit

Permalink
added another example
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdf authored May 29, 2017
1 parent 2310a50 commit b8a4658
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,30 @@ class App extends React.Component {
}
```

Alternatively, this example shows how you could disallow the `<iframe>` element:

```js
function renderNode(node, index, siblings, parent, defaultRenderer) {
if (node.name == 'iframe') {
return null;
}
}

const htmlContent = `
<div>
<iframe src="http://info.cern.ch/" width="360" height="300" />
</div>
`;

class App extends React.Component {
render() {
return (
<HTMLView value={htmlContent} renderNode={renderNode} />
);
}
}
```

### Changelog

- 0.9.0
Expand Down

0 comments on commit b8a4658

Please sign in to comment.