Opened 10 years ago

Closed 9 years ago

#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 (10)

comment:1 Changed 9 years ago by fredck

  • Cc Pascal.KUSTNER@… added
  • Keywords SD-COE added
  • Milestone changed from FCKeditor 3.0 to FCKeditor 2.5

comment:2 Changed 9 years ago by fredck

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

comment:3 Changed 9 years ago by fredck

  • Cc pkdille Jyhem nyloth added; Pascal.KUSTNER@… jean-marc.libs@… patrice.weber@… removed

comment:4 Changed 9 years ago by martinkou

  • Owner set to martinkou
  • Status changed from new to assigned

comment:5 Changed 9 years ago by martinkou

Fixed with [414].

Click here for more info about our SVN system.

comment:6 Changed 9 years ago by martinkou

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:7 Changed 9 years ago by pkdille

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 9 years ago by fredck

  • Milestone changed from FCKeditor 2.5 Beta to FCKeditor 2.5

comment:9 Changed 9 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 9 years ago by martinkou

  • Resolution set to worksforme
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy