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.
Buttons
External Button
Try it yourself:
This example illustrates how to clear the text using a button external to the Froala WYSIWYG HTML Editor interface.
HTML
<div id="froala-editor"> <p>This example illustrates how to clear the text using a button external to the Froala WYSIWYG HTML Editor interface.</p> </div> <p><a id="get-text" class="btn r-btn highlight text-small">Clear</a></p>
JAVASCRIPT
<script> $(function() { $('div#froala-editor') .on('froalaEditor.initialized', function (e, editor) { editor.events.bindClick($('body'), 'a#get-text', function () { editor.html.set(''); editor.events.focus(); }); }) .froalaEditor() }); </script>