Gutenberg: Double enter should break out captions and lists (and similar) and onto a newline

Created on 1 May 2017  Â·  8Comments  Â·  Source: WordPress/gutenberg

From Ella:

break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

This should apply captions and list blocks, and probably other similar ones.

[Feature] Rich Text [Type] Enhancement

Most helpful comment

  1. You make a linebreak inside the caption (or paragraph break or whatever)

+1 — this is how I'd expect it to work.

3rd option: break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

+1 to this as well :)

All 8 comments

I think number one seems expected.

3rd option: break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

Option 2 question: what happens if you're _not_ at the end?

3rd option: break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

I like that. Also handily provides an answer to your solid followup option 2 question.

That being said, if we did go with option 2, pressing enter mid-sentence would, I suppose, split the stuff after the caret into a new paragraph.

Which leads to option 4: don't do anything when you press enter. No new lines, no nothing. You'd have to use the arrow keys to exit the paragraph.

  1. You make a linebreak inside the caption (or paragraph break or whatever)

+1 — this is how I'd expect it to work.

3rd option: break out of the caption if the line is empty (so double enter to break out). This seems in line with WP's current block quote behaviour, where you break out the quote if you hit enter in the last paragraph and it is empty.

+1 to this as well :)

I am not sure about breaking out of the caption with enter.

I am not sure about breaking out of the caption with enter.

Just to be clear, it's enter enter — that is, enter on an empty line. Would you prefer the way to break out of a caption would be tab or arrow keys?

See also #374

The case where you start breaking within the middle of a caption complicates it. Also as we consider all the new blocks being created, "breaking" the content of a block field by hitting enter is going to be fragile and convoluted. I think in most cases we should just remain within the editable field you are in.

Per this discussion, let's embrace the block, and close this for now. Tab will escape you. And if that isn't enough, we can reopen.

Was this page helpful?
0 / 5 - 0 ratings