ForgeComponents
en

Components

j-iFrameEditable

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • 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.

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>