Closed
Bug 46824
Opened 25 years ago
Closed 25 years ago
pasting bullets causes problems
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
M18
People
(Reporter: sujay, Assigned: mozeditor)
Details
using 7/28 trunk build of netscape
1) launch netscape
2) launch composer
3) enable bullet list
4) enter several items
5) select all and copy
6) open new blank page
7) Edit | Paste into this new blank page
notice the first and last item are not bulleted..they should be..
no bullets should be lost.
all platforms.
Comment 1•25 years ago
|
||
Joe -- I won't + this one until you give it a look and confirm it is an issue
Keywords: correctness,
nsbeta3
Target Milestone: --- → M18
| Assignee | ||
Comment 2•25 years ago
|
||
This is a dup of several bugs, some of which I have and some of which akkana has.
There is more goin on here than just problems with lists. Basically, there is no
support yet in paste for making sure the result of the paste is valid.
There is also a related issue with copying. If you select all the children inside
some piece of content, we should probably copy the parent. And if that parent is
the only child of some other content, then we should really be copying the
grandparent, etc...
Then on pasting, in order to create a valid document, we may need to split some
contnet at the point of the paste, and also "invent" entirely new content. For
instance, if you paste a list item into the middle of a paragraph, you need to
split the paragraph, then insert a list, and finally past the list item into that
list.
Note that the best results are not neccessarily spelled out by the dtd. For
instance, in the case I mention above, either an <ol> or a <ul> could be
inserted. If all you have to paste in is a list item, there no way to know which
to prefer.
I'm unfamiliar with our copy system. Perhaps we could invent a new data flavor
for use when copying/pasting within our own product, and that flavor could not
only define the copied html, but also give what it's parent heirarchy was. That
way, we could see that the list item we are pasting originally came from an <ol>,
so maybe we should paste it in as an ol if we have to create a list. But we
would still happily paste it into a ul if the user explicitly pasted it into a
ul.
One problem with this approach is that the copied html does not necessarily have
a simple parent hierarchy. For instance, if you have the document:
<html>
<body>
<div>
<ol><li>
Here is the first list item
</li><li>
Here is the last list item
</li></ol>
</div>
<p><b><u>
Here is some bold underlined text
</u>
This text is bold but not underlined.
</b></p>
</body>
<html>
and you select the last list item and the bold-undeline text and copy, then part
of the copy has a parent hierarchy of <ol>-><div>-><body>,
and part has <u>-><b>-><p>-><body>.
More complex examples can get arbitrarily messy.
| Assignee | ||
Comment 3•25 years ago
|
||
dup of 47014
*** This bug has been marked as a duplicate of 47014 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•