Days
Hours
Minutes
Seconds
x

New Froala Editor v5.0.0 is here โ€“ Learn More

Skip to content
Froala Documentation

API

Live Content Preview

This example allows you to see when the contentChanged event is triggered and how the rich text editor's content appears outside the editable area.

Try it yourself:


Edit in JSFiddle

HTML

<div id="froala-editor">
  <p>Start typing and you can preview the content of the WYSIWYG HTML editor as you type below the editing box.</p>
</div>
<br/>
<div id="preview" class="fr-view">
  <p>Start typing and you can preview the content of the WYSIWYG HTML editor as you type below the editing box.</p>
</div>

JAVASCRIPT

<script>
  $(function() {
    new FroalaEditor('div#froala-editor', {
      events: {
        contentChanged: function () {
          $('#preview').html(this.html.get());
        }
      }
    })
  });
</script>
Sign up

Download the code by signing up for our newsletter

Sign up

Download the code by signing up for our newsletter

Note: By registering, you confirm that you agree to the processing of your personal data by Froala, Inc. - Froala as described in the Privacy Statement. Froala, Inc. - Froala is part of the Idera group and may share your information with its parent company Idera, Inc., and its affiliates. For further details on how your data is used, stored, and shared, please review our Privacy Statement.