- 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
API
Insert HTML Button
Try it yourself:
HTML
<div id="froala-editor"></div>
JAVASCRIPT
<script>
$(function() {
FroalaEditor.DefineIcon('insertHTML', { NAME: 'plus', SVG_KEY: 'add' });
FroalaEditor.RegisterCommand('insertHTML', {
title: 'Insert HTML',
focus: true,
undo: true,
refreshAfterCallback: true,
callback: function () {
this.html.insert('Some Custom HTML.');
this.undo.saveStep();
}
});
new FroalaEditor('div#froala-editor', {
toolbarButtons: [
['bold', 'italic', 'underline', 'paragraphFormat', 'formatOL', 'formatUL'],
['insertHTML', 'undo', 'redo', 'html']
]
})
});
</script>