- 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
- Froala Docs
- /
- Concepts
- /
- Save
- /
- Inside FORM
Save Concepts
Save inside FORM
To store the content of the editor on the server side save the content inside a FORM. Initialize the editor on a textarea
inside a form, then send the content to the server as value of textarea
.
Initialize the editor
<form action="save" method="POST">
<textarea name="editor_content" id="myEditor"></textarea>
<button>Submit</button>
</form>
<script>
new FroalaEditor('#myEditor', {toolbarInline: false})
</script>
Receive request on the server
The FORM sends the content in the editor_content
parameter of the request (which is the name of the textarea), the server processes the request and saves the data in the DB.
PHP example: For the code above you would get the rich text editor's content in $_POST['editor_content']
variable.
Do you think we can improve this article? Let us know.