Skip to content

The Paste as Text command creates soft-breaks when it should create hard-breaks. #1745

@stevencohn

Description

@stevencohn

Problem to Solve

The Paste as Text command creates soft-breaks when it should create hard-breaks.
The sequence \r\n is translated to the soft-break <br>, resulting in a continuous paragraph with line breaks. But this sequence should be translated to a hard-break, resulting in separate paragraphs.

To Reproduce

Steps to reproduce the behavior:

  1. Copy CRLF text containing \r\n line breaks
  2. Use the Paste as Text command (Ctrl+Shift+V) to paste the text on a page
  3. The resultant block of text contains soft-breaks
<one:OE alignment="left" quickStyleIndex="1">
  <one:T><![CDATA[Lorem ipsum dolor sit amet<br>
consectetur adipiscing elit<br>
sed do eiusmod tempor incididunt]]></one:T>
</one:OE>

Expected Behavior

CRLF text should be pasted with individual lines separated by hard-breaks into paragraphs

<one:OE alignment="left" quickStyleIndex="1">
  <one:T><![CDATA[Lorem ipsum dolor sit amet]]></one:T>
</one:OE>
<one:OE alignment="left" quickStyleIndex="1">
  <one:T><![CDATA[consectetur adipiscing elit]]></one:T>
</one:OE>
<one:OE alignment="left" quickStyleIndex="1">
  <one:T><![CDATA[sed do eiusmod tempor incididunt]]></one:T>
</one:OE>

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleasedAvailable in a released installer

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions