- Getting Started
- Browser Support
- Languages Support
- Shortcuts
- Activation
- Examples
- Customize the Editor
- Use-cases
- Plugins
- APIs
- Development Frameworks
- Server Integrations
- Server SDKs
- Migration Guides
- Changelog
- Tutorials
Buttons
External Button
Try it yourself:
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>
new FroalaEditor('div#froala-editor', {
events: {
initialized: function () {
var editor = this;
editor.events.bindClick(editor.$('body'), 'a#get-text', function () {
editor.html.set('');
editor.events.focus();
})
}
}
});
</script>