Im trying to accomplish this:
But instead of using a textarea, use an iframe with designmode = 'on'
It doesn’t seem to work =/
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.
Have a look at this piece of code:
Here’s the behavior of the various browsers tested:
<br />tags are appended to form the line breaks. At the start, there’s no<br />, while after the first line break one is added before the current cursor position and one after<div>are used to contain each line.<br />are used for empty lines. The first line is not wrapped<p>are used to contain each line.Lesson: Don’t use
contentEditableordesignMode! The behavior is horribly inconsistent and quite useless for cases like this. Of course you can use hacks to get around this, but what happens when new browsers come out? You’d have to maintain this till the end of time!