Skip to content
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

How to add text before a blockquote? #7636

Closed
neongreen opened this issue Jul 16, 2020 · 9 comments · Fixed by #8569
Closed

How to add text before a blockquote? #7636

neongreen opened this issue Jul 16, 2020 · 9 comments · Fixed by #8569
Assignees
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:typing squad:core Issue to be handled by the Core team. type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@neongreen
Copy link

If I have a blockquote at the top of the document, I seem to be stuck. No amount of Shift+Enter lets me escape the blockquote.

Perhaps blockquotes should have magic block buttons?

@neongreen neongreen added the type:improvement This issue reports a possible enhancement of an existing feature. label Jul 16, 2020
@Reinmar
Copy link
Member

Reinmar commented Jul 20, 2020

For me, pressing Enter (in an empty line) works. Doesn't it work for you?

@neongreen
Copy link
Author

Hmmm.

It works for me as well. But... sometimes it doesn't.

I accidentally reproduced it once more right now, forgot how I did it, and spent five more minutes failing to reproduce it.

@neongreen
Copy link
Author

Oh. I just managed to bring my editor to this state again, though I don't know how. Looking at the DOM, I have this:

image

I don't know under what circumstances CKEditor inserts zero-width spaces.

@Reinmar
Copy link
Member

Reinmar commented Aug 3, 2020

The thing that you see is 7 zero-width-spaces. It's a so-called "inline filler" that forces the browser to render the selection in the exact place where we want. Otherwise, in some cases (not in this one, actually) some browsers (Chrome, Safari) will move the selection where they see it fit.

Anyway, this is handled on the rendering level, so none of the editor features knows about it (the 7ZWSes don't appear in the model and the view) and hence they cannot affect what the Enter does.

What happened in your case is that you tried pressing Shift+Enter and not Enter itself (probably somehow intuitively). That resulted in inserting soft breaks instead of breaking out of the block quote.

@Reinmar Reinmar added the pending:feedback This issue is blocked by necessary feedback. label Aug 3, 2020
@neongreen
Copy link
Author

Yeah, I think I tried pressing Shift+Enter. Soft breaks are useful so I guess there's nothing else to be done here? Other than the option of adding magic line buttons to blockquotes. (Btw, how do I do that?)

@Reinmar
Copy link
Member

Reinmar commented Aug 4, 2020

@oleq pointed out to me that Backspace could also escape a blockquote in such a case:

<blockQuote>
	<paragraph>[]</paragraph>
	<paragraph>xxx</paragraph>
</blockQuote>

It might also be quite intuitive. The enter is more natural at the end, while at the beginning it's a bit counterintuitive.

WDYT?

@Reinmar Reinmar added the squad:core Issue to be handled by the Core team. label Aug 4, 2020
@neongreen
Copy link
Author

Sure, backspace at the beginning sounds fine.

@oleq
Copy link
Member

oleq commented Aug 4, 2020

It might also be quite intuitive. The enter is more natural at the end, while at the beginning it's a bit counterintuitive.

This is something I'm always trying to do and then I get frustrated because it does not work this way.

@Reinmar Reinmar added domain:ui/ux This issue reports a problem related to UI or UX. package:typing and removed pending:feedback This issue is blocked by necessary feedback. labels Oct 16, 2020
@Reinmar
Copy link
Member

Reinmar commented Oct 16, 2020

This should probably be handled in #8137.

@Reinmar Reinmar added this to the nice-to-have milestone Nov 2, 2020
@niegowski niegowski modified the milestones: nice-to-have, iteration 38 Dec 2, 2020
@niegowski niegowski self-assigned this Dec 2, 2020
@niegowski niegowski modified the milestones: iteration 38, iteration 39 Dec 2, 2020
@Reinmar Reinmar modified the milestones: iteration 38, iteration 39 Dec 4, 2020
Reinmar added a commit that referenced this issue Dec 22, 2020
Feature (typing): Empty block element at the beginning of the limit element should be converted to a paragraph on backspace key press. Closes #8137.

Feature (block-quote): Block-quote should be split on backspace key press at the beginning of the block-quote. Closes #7636.

Fix (list): The `delete` event handler listening on a higher priority to avoid intercepting by the block-quote and widget handler. Closes #8706.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:typing squad:core Issue to be handled by the Core team. type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
4 participants