简体   繁体   中英

Copy new paragraphs in an HTML form

I have an HTML form that looks like this:

<textarea class="input" name="content" cols="70" rows="10" wrap="hard"></textarea>
The value in the textarea is then transfered into a database so it can be displayed later. What I ask myself is: how can the style and the form of the text be remained, so that when a user enters a text, all his new paragraphs are also being saved in the database?

The question could also be: how does the form, which I am currently using on stackoverflow.com, work, how does it save the paragraphs that I make and how do the options on top work, which can make my text bold, italic etc.?

Thank you.

You need to research about markdown answers here is one https://stackoverflow.com/a/35057668/175554

and another one How can I convert HTML to markdown?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM