From:  Michael Gordon <>
Date:  18 Jan 2005 08:26:51 Hong Kong Time

Re: designMode having problems with newlines?


Thomas -Balu- Walter wrote:

>I am just playing around with the mozilla editor/designMode
>implementation. To do so I've created a small prototype to test the
>functionality, etc.
>You can find a temporary copy (unclean source) at
>The problem I experience seems to be related to newlines in the file
>empty.html the edit-iFrame get's loaded with at the beginning.
>If you load the page, switch to source view and try to add some content
>at the end (or in one of the table cells or similar) the typed
>chars are added a few characters to the left of the cursor. 
>Removing the newlines from the empty.html avoids this problem.
>But is this a bug or a feature? What else might cause this? Is the only
>method to avoid this problem the removal of the newlines?
>     Balu
Hello Balu,

In one respect you could consider this a bug, however in another an 
asset.  In your case it's a minor bug where you have content within a 
HTML tag, in the case where the author leaves table cells empty it 
becomes an asset.  The 
tag places something of value inside an otherwise empty set of HTML tags. The only way to remove the extra
tags is to use an external editor, Mozilla Composer will usually reinsert those tags in empty HTML tag set when you open the source editor and close the editor. However, if you use an external editor and remove the excess
tags, even leaving HTML tag sets empty, Composer will not refill the
tags when in Compose mode, only when the source editor is closed. Michael