Days
Hours
Minutes
Seconds
x

New Froala Editor v4.3.1 is here – Learn More

Skip to content

Modes

Init On Click

init-on-click

Try it yourself:

Init on click improves the page performance by initializing only the basic code when the page is loaded and the rest of the code when clicking in the editable area. It is highly recommended to use the initOnClick option if you have more rich text editors on the same page.

Click here to initialize the WYSIWYG HTML editor on this text.


Edit in JSFiddle

HTML

<div id="froala-editor">
  <p>Init on click improves the page performance by initializing only the basic code when the page is loaded and the rest of the code when clicking in the editable area. It is highly recommended to use the <a href="../docs/options#initOnClick" title="initOnClick option" target="_blank">initOnClick</a> option if you have more rich text editors on the same page.</p>
  <p><strong>Click here to initialize the WYSIWYG HTML editor on this text.</strong></p>
</div>

JAVASCRIPT

<script>
  $(function() {
    $('div#froala-editor').froalaEditor({
      initOnClick: true
    })
  });
</script>