# j-iFrameEditable

> j-iFrameEditable: can edit HTML safely; height of iframe is automatically counted from the body

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: b620daa85581caaedf7a2bd24359836df396706c6be723812fcdfa90150137b8
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- can edit HTML safely
- height of iframe is automatically counted from the `body`
- __important__: content must contain `contenteditable` attribute

__Configuration__:

- `bind {String}` can contain `body` (default), `html` or `contenteditable`

__Methods__:

- `component.resize()`

Use it with `<ui-component name="iframeeditable">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<div>This component can edit HTML code safely:</div>
<ui-component name="iframeeditable" path="customhtml"></ui-component>

<script>
	SET('customhtml', '<div contenteditable="true"><div><b>Total.js</b></div><br /><br /><a href="https://www.totaljs.com">www.totaljs.com</a></div>');
</script>
```
