EDIT . You need to add the name attribute to the text box so that it is published in your PHP. It slipped from my mind. So forget all the other changes I made, just do this in your text box in your source code:
<textarea class="textarea" id="content" name="content" placeholder="Enter text ..."></textarea>
You should also send values ββthrough a POST request, because sending html to the url arguments is not a good idea.
Old answer:
You should also post html when submitting the form. There are several ways to do this, but as an example, you can add a hidden input field in which you will store html before sending it to php.
At first I changed your html a bit, the form is now submitted via a POST request, which is better than using URL arguments if you want to send HTML:
<form id="myform" action="save.php" method="POST"> <textarea class="textarea" id="content" placeholder="Enter text ..."></textarea> <input type="submit" class="btn btn-primary" /> <input type="hidden" id="html" /> </form>
Add a javascript event to change the value of the hidden field before sending the value:
$("#myform").submit(function() {
source share