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

If caption is empty, hitting enter should work as down arrow #2173

Closed
mtias opened this issue Aug 3, 2017 · 3 comments
Closed

If caption is empty, hitting enter should work as down arrow #2173

mtias opened this issue Aug 3, 2017 · 3 comments
Assignees
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable

Comments

@mtias
Copy link
Member

mtias commented Aug 3, 2017

Right now we create new lines, which is fine if there's some content already in the caption, but if it's empty we should treat it as a down arrow.

cc @iseulde

@mtias mtias added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Aug 3, 2017
@mtias mtias added this to the 0.10.0 milestone Aug 18, 2017
@karmatosed karmatosed modified the milestones: 0.11.0, 0.10.0 Aug 25, 2017
@youknowriad youknowriad self-assigned this Aug 30, 2017
@youknowriad
Copy link
Contributor

Per slack discussion, I'm going to try to make this consistent with headings and paragraphs:

Enter splits into two blocks (creating a paragraph block)
shift+Enter create <br>

@BE-Webdesign
Copy link
Contributor

This could extend to how we deal with other semi nested blocks like quotes + citation and other figures with a caption. Potential use of enter behavior noted by Riad:

  • Enter in the middle of a caption, create <br>
  • Enter at the end of a caption, creates an new paragraph
  • shift Enter always creates <br>

Potential addendum: if the caption/citation is empty only then create a new paragraph on Enter. If there is existing content in the citation maybe the user wants that extra whitespace.

@mtias
Copy link
Member Author

mtias commented Aug 30, 2017

I don't think we need to handle splitting, that's why I mentioned if it's empty. If the caption was at the top of the image, would you expect to create a new paragraph below? Or if a block has a few editable that are fixed, what would happen?

Also, this was before keyboard navigation, I think, and the main issue was getting stuck in the caption when you didn't want one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable
Projects
None yet
Development

No branches or pull requests

4 participants