Hi Balu,

It seems that the problem is that your "empty.html" is missing attributes in
the header and body.

Try specifying the DOCTYPE, the META character set and setting the BODY
margins (I pasted an example below for you). Not having the BODY margins is
is the problem causing your bug.

Nice job on your editor code & implementation so far!

Would it be possible for me to use/adapt your table editing code? I have
been looking for something to do that for a while with my editor.


"EMPTY.HTML" file setup:
---------------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd";>

<html>
<head>
    <title>Editor Content</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>

<body marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0"
topmargin="0" bottommargin="0">


testing... This is <b>not <i>really <img
src="http://www.heise.de/icons/ho/heise.gif"; alt=""></i> empty</b>... <table
border="1"><tbody> <tr> <td>AA</td> <td>AB</td> <td>AC</td> <td>AD</td>
</tr> <tr> <td>BA</td> <td>BB</td> <td>BC</td> <td>BD</td> </tr> <tr>
<td>CA</td> <td>CB</td> <td>CC</td> <td>CD</td> </tr> <tr> <td>DA</td>
<td>DB</td> <td>DC</td> <td>DD</td> </tr> </tbody></tabl


</body>
</html>

---------------------------------------------

Best regards,
Robert


On 1/17/05 5:38 PM, in article [EMAIL PROTECTED], "Thomas
-Balu- Walter" <[EMAIL PROTECTED]> 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
> http://www.b-a-l-u.de/Playground/tmpedit/
> 
> 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

_______________________________________________
mozilla-editor mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-editor

Reply via email to