New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste: Single-line pastes should conform to current block #6555

Closed
mcsf opened this Issue May 3, 2018 · 6 comments

Comments

@mcsf
Contributor

mcsf commented May 3, 2018

Issue Overview

A revisit of #5354. Per the last comment, this is the behavior we'd like to achieve when copying (a) list item(s) from a rich-text source:

  • If you are on an empty paragraph, respect the source [and create a new list block, for instance].
  • Otherwise, if you copied more than one line, respect the source [and create a new list block, for instance].
  • Otherwise, if you copy a single line, paste as plain text [and merely add to the current paragraph].

The last point is where behavior differs: currently, pasting will always create a new block (for a list, etc.) unless the clipboard only contains pure text.

@iseulde

This comment has been minimized.

Show comment
Hide comment
@iseulde

iseulde May 3, 2018

Member

Sure. So how do we determine that something is a single line?

<ul><li>If you are on an empty paragraph, respect the source [and create a new list block, for instance].</li></ul>
<pre><code>A huge chunk of code</code></pre>

We'll have to specifically target some kind of blocks?

Member

iseulde commented May 3, 2018

Sure. So how do we determine that something is a single line?

<ul><li>If you are on an empty paragraph, respect the source [and create a new list block, for instance].</li></ul>
<pre><code>A huge chunk of code</code></pre>

We'll have to specifically target some kind of blocks?

@mcsf

This comment has been minimized.

Show comment
Hide comment
@mcsf

mcsf May 4, 2018

Contributor

@iseulde: we would probably start small and focus on lists first, as they are the kind of content that sparked this discussion.

Contributor

mcsf commented May 4, 2018

@iseulde: we would probably start small and focus on lists first, as they are the kind of content that sparked this discussion.

@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Jun 22, 2018

Contributor

We could try a char-length cutout as well.

Contributor

mtias commented Jun 22, 2018

We could try a char-length cutout as well.

@mtias mtias added the Writing Flow label Jun 22, 2018

@mcsf

This comment has been minimized.

Show comment
Hide comment
@mcsf

mcsf Jul 9, 2018

Contributor

@mtias, can you elaborate?

Contributor

mcsf commented Jul 9, 2018

@mtias, can you elaborate?

@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Jul 9, 2018

Contributor

If the source has less than x length, we treat it as plain text.

Contributor

mtias commented Jul 9, 2018

If the source has less than x length, we treat it as plain text.

@iseulde

This comment has been minimized.

Show comment
Hide comment
@iseulde

iseulde Oct 15, 2018

Member

PR coming up.

Member

iseulde commented Oct 15, 2018

PR coming up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment