- 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
Typing
ENTER Key
The way ENTER key behaves can be customized using the enter option. There are 3 possible options:
Try it yourself:
HTML
<div id="froala-editor-p">
By default the editor is using <code>P</code> tags. When ENTER key is hit, a new <code>P</code> tag is created.
</div>
<br/>
<div id="froala-editor-div">
The editor can use <code>DIV</code> tags. When ENTER key is hit, a new <code>DIV</code> tag is created.
</div>
<br/>
<div id="froala-editor-br">
The editor can use <code>BR</code> tags. When ENTER key is hit, a <code>BR</code> tag is inserted.
</div>
JAVASCRIPT
<script>
new FroalaEditor('div#froala-editor-p');
new FroalaEditor('div#froala-editor-div', {
enter: FroalaEditor.ENTER_DIV
});
new FroalaEditor('div#froala-editor-br', {
enter: FroalaEditor.ENTER_BR
});
</script>