Textarea segment spacing tagging

textarea how to let users wrap the code before carriage enter with a P element each time they press enter
or how to achieve segment spacing (not line spacing)
ask for advice


  1. it is difficult to get the previous content and add the p tag, because there may already be a p tag before the p tag;
  2. The recommended approach for
  3. is to listen for the enter key and add

replace it with

the spaces in the string and enter

by adding

to the string and

the effect has been achieved by


can't you use rich text plug-ins

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ba1fd1-2e30e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ba1fd1-2e30e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?