Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Div content editable


  • From: javascript@xxxxxxxxxx (Andrew Gibson)
  • Subject: [Javascript] Div content editable
  • Date: Sun, 20 Oct 2002 19:57:20 +1300

This is a multi-part message in MIME format.

------=_NextPart_000_0024_01C27872.E624EE20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have a div which is contenteditable

But when the user hits enter, it creates a new <p></p>, resulting in the =
cursor dropping 2 lines but I just want it to drop a single line!

How can I have it so the enter button only creates, I presume, a <br> so =
the cursor just drops a single line?

Andrew


------=_NextPart_000_0024_01C27872.E624EE20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2719.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>I have a div which is contenteditable</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>But when the user hits enter, it creates a new=20
&lt;p&gt;&lt;/p&gt;, resulting in the cursor dropping 2 lines but I just =
want it=20
to drop a single line!</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>How can I have it so the enter button only creates, =
I presume,=20
a &lt;br&gt; so the cursor just drops a single line?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Andrew</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0024_01C27872.E624EE20--