Textareas are great because of some built in functionality (scrollbars). How can I format <spans> of text inside of the <textarea>?
Textareas are great because of some built in functionality (scrollbars). How can I format
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you need to customize your textarea, reproduce its behavior using another element (like a DIV) with the
contenteditableattribute.It’s more customizable, and a more modern approach, textarea is just for plain text content, not for rich content.
The scrollbars can be reproduced with the CSS overflow property.
You can use this fake textarea in a form normally, i.e: if you have to submit its content through POST method, you could do something like(with jQuery):
…