Closed Bug 16720 Opened 25 years ago Closed 24 years ago

Editor's formatting of table HTML code needs newlines after end tags

Categories

(Core :: DOM: Editor, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: relliott, Assigned: akkzilla)

References

Details

(Whiteboard: [nsbeta2-])

When creating a table, Editor produces HTML code that doesn't group the tags
intuitively. Rather than this,
<tr>
<td valign="top">stuff goes here</td>
</tr>
<tr bgcolor="#99cccc">
<td width="5">more stuff goes here</td>
<td width="159">
</tr>

the new composer is generating this:

</tr><tr>
<td valign="top">stuff goes here</td></tr><tr bgcolor="#99cccc">
<td width="5">more stuff goes here</td><td width="159"></td></tr>

Although it still works it is ugly and hard to follow or edit by
hand. Editor should detect the end of table rows and put them on separate lines.
Indenting the code might also be nice, but that's probably a separate bug.
Status: NEW → ASSIGNED
Target Milestone: M15
Accepting, though unfortunately this isn't considered a priority item so far.
Target Milestone: M15 → M14
Moving to M14 because this is really part of bug 490 and that's where that bug
lives.  (But for now, I'm keeping this bug open rather than duping it to make
sure that the table formatting specifically gets fixed and tested.)
I just checked in some improvements: the table formatting is much better now!
There are still some minor problems, e.g. extra newlines in empty table cells
(but that's better than too few newlines between tags).

I'm going to mark this fixed.  I hope to continue working on formatting as time
permits, but I think this is good enough to get us to beta.  If there are other
tags or specific cases which still need work (I expect there will be), please
file bugs on those cases.  It should be easier now to add code for special
cases.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
still not working in 1/26 build...will try tomorrow's build.
Whiteboard: will verify in 1/27 build.
verified in 1/26 build.
Status: RESOLVED → VERIFIED
Looks like this regressed recently, mozilla no longer outputs newlines between
<tr>'s when copying table rows and pasting into a text editor, nor does mozilla
separate <td>'s with a space either, reopening.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Accepting.  I see it, too.  We need to track down this regression: it makes
copy/paste unusable.  I think it was something recent.  Nominating for nsbeta2.
Status: REOPENED → ASSIGNED
Keywords: nsbeta2
Whiteboard: will verify in 1/27 build.
Target Milestone: M14 → M17
Putting on [nsbeta2-] radar. Not critical to beta2.  Adding "nsbeta3" keyword 
for consideration of a fix for that milestone. 
Keywords: nsbeta3
Whiteboard: [nsbeta2-]
This regression was due to 42429.  Marking dependency.
Depends on: 42429
Wait, I was confused.  This bug concerns newlines in source formatting, which
regressed but was fixed due to some work by Harish (and that's what bug 42429
covers, though most of the problem seems to be fixed even though that bug is
still open).  Johnny's reopening concerns conversion to plaintext, which is
another issue entirely.  The original issue in this bug is fixed; rather than
let it morph, I'm going to close this one because I already have the "newlines
lacking after tr in conversion to plaintext" covered in bug 46333.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
verified in 7/25 build
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.