Ticket #102 (closed New Feature: worksforme)
Paste as Plain Text behaviour should depend on EnterMode
| Reported by: | fredck | Owned by: | martinkou |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.5 |
| Component: | General | Version: | |
| Keywords: | SD-COE | Cc: | pkdille, Jyhem, nyloth |
Description
The following behavior should be achieved:
- If EnterMode=p, text blocks separated with double line breaks should be enclosed in a <p>, while single line breaks produce a <br>;
- If EnterMode=div, each block separated by a line break will be enclosed in a <div>. Double line breaks will generate empty <div>s.
- If EnterMode=br, line breaks will generate a <br> (current behavior).
Note for "p" and "div" modes: the first text block must not generate a "p" or "div", but be inserted in the cursor location. If further "p" or "divs" must be pasted, the cursor current block must be broken and the new blocks must be pasted after it.
Inside a <li>, each line break should generate a <li>, except when EnterMode=p, where each double line break generates a <li>.
Change History
comment:1 Changed 5 years ago by fredck
- Cc Pascal.KUSTNER@… added
- Keywords SD-COE added
- Milestone changed from FCKeditor 3.0 to FCKeditor 2.5
comment:3 Changed 5 years ago by fredck
- Cc pkdille, Jyhem, nyloth added; Pascal.KUSTNER@…, jean-marc.libs@…, patrice.weber@… removed
comment:4 Changed 5 years ago by martinkou
- Owner set to martinkou
- Status changed from new to assigned
comment:5 Changed 5 years ago by martinkou
Fixed with [414].
Click here for more info about our SVN system.
comment:6 Changed 5 years ago by martinkou
- Status changed from assigned to closed
- Resolution set to fixed
comment:7 Changed 5 years ago by pkdille
- Status changed from closed to reopened
- Resolution fixed deleted
The behavior discribed for EnterMode=p is not working. Every text block is enclosed by <p> </p> no matter if there are one or 2 line breaks between the blocks. A "double line break" also called a blank line break produces a <p> </p>
comment:9 Changed 5 years ago by martinkou
[1081] fixes the empty paragraph incorrectly generated in IE after a paste as plain text operation. I don't really understand what you meant by "Every text block is enclosed by <p> </p> no matter if there are one or 2 line breaks between the blocks." though - it is expected that paragraphs be enclosed in <p> tags in EnterMode=p, and the double line breaks in plain text should correspond to paragraph breaks while single line breaks should correspond to line breaks inside paragraphs. So say I have the following plain text:
p1l1 p1l2 p1l3 p2l1 p2l2 p2l3
When pasted into an empty document via "Paste as Plain Text", I should get
<p> p1l1<br /> p1l2<br /> p1l3 </p> <p> p2l1<br /> p2l2<br /> p2l3 </p>
And that's what our current code is doing, which should be correct. Do you have a test cases where the code isn't behaving as expected?
comment:10 Changed 4 years ago by martinkou
- Status changed from reopened to closed
- Resolution set to worksforme
