Opened 17 years ago

Closed 16 years ago

#102 closed New Feature (worksforme)

Paste as Plain Text behaviour should depend on EnterMode

Reported by: Frederico Caldeira Knabben Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.5
Component: General Version:
Keywords: SD-COE Cc: pkdille, Jean-Marc Libs, 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 (10)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Cc: Pascal.KUSTNER@… added
Keywords: SD-COE added
Milestone: FCKeditor 3.0FCKeditor 2.5

comment:2 Changed 17 years ago by Frederico Caldeira Knabben

Cc: jean-marc.libs@… patrice.weber@… added

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Cc: pkdille Jean-Marc Libs Nyloth added; Pascal.KUSTNER@… jean-marc.libs@… patrice.weber@… removed

comment:4 Changed 17 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:5 Changed 17 years ago by Martin Kou

Fixed with [414].

Click here for more info about our SVN system.

comment:6 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

comment:7 Changed 16 years ago by pkdille

Resolution: fixed
Status: closedreopened

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>&#160;</p>

comment:8 Changed 16 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.5 BetaFCKeditor 2.5

comment:9 Changed 16 years ago by Martin Kou

[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 16 years ago by Martin Kou

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy