Days
Hours
Minutes
Seconds
x

New Froala Editor v5.0.0 is here โ€“ Learn More

Skip to content

Concepts

Save inside FORM

Saving the content of the rich text editor inside a FORM is the easiest way to get the edited content on server side and store it. Basically, the WYSIWYG HTML editor is initialized on a textarea inside a form and the content is sent to the server as value of the textarea.

Initialize the WYSIWYG HTML editor

<form action="save" method="POST">
  <textarea name="editor_content" id="myEditor"></textarea>
  <button>Submit</button>
</form>

<script>
  $(function() {
    $('#myEditor')
      .editable({inlineMode: false})
  });
</script>

Receive request on the server

When the submit button is hit, the FORM content will be sent to the server. The content will be sent in the editor_content parameter of the request (which is the name of the textarea) and the server has to process the request and save 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.

Sign up

Download the code by signing up for our newsletter

Sign up

Download the code by signing up for our newsletter

Note: By registering, you confirm that you agree to the processing of your personal data by Froala, Inc. - Froala as described in the Privacy Statement. Froala, Inc. - Froala is part of the Idera group and may share your information with its parent company Idera, Inc., and its affiliates. For further details on how your data is used, stored, and shared, please review our Privacy Statement.