It looks like you’re browsing an old version of Froala. Please go to the newer version of our docs for a more updated version.
API
Live Code Preview
Try it yourself:
Preview the HTML code of the WYSIWYG HTML editor as you type in the box below.
HTML
<div id="froala-editor"> <p>Preview the HTML code of the WYSIWYG HTML editor as you type in the box below.</p> </div> <br/> <pre id="eg-previewer" class="prettyprint linenums:1"> </pre>
JAVASCRIPT
<script> $(function() { $('div#froala-editor') .on('froalaEditor.contentChanged froalaEditor.initialized', function (e, editor) { $('pre#eg-previewer').text(editor.codeBeautifier.run(editor.html.get())) $('pre#eg-previewer').removeClass('prettyprinted'); prettyPrint() }) .froalaEditor() }); </script>