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

Unable to add new lines in paragraph with template_lock = 'all' #22550

Closed
pwkip opened this issue May 22, 2020 · 0 comments
Closed

Unable to add new lines in paragraph with template_lock = 'all' #22550

pwkip opened this issue May 22, 2020 · 0 comments
Labels
[Feature] Templates API [Type] Bug

Comments

@pwkip
Copy link
Contributor

@pwkip pwkip commented May 22, 2020

Describe the bug

If you create a template lock like this:

$args = [
  'template_lock' => 'all',
  'template' => [[ 'core/paragraph' ]],
];

It is impossible to add new lines in the paragraph.
In non-locked paragraphs, you can add <br> by pressing Shift+Return

To reproduce

  1. Create a post type with a template_lock = 'all', and template= [[core/paragraph]]
  2. Try to add a new line in the paragraph by pressing Return and Shift+Return

Expected behavior

I expect a new line to appear when I press Return or Shift+Return

Screenshots

Editor version

  • WordPress 5.4.1
  • gutenberg plugin 8.1.0

Desktop

  • OS: Ubuntu 20.04
  • Chrome
@annezazu annezazu added [Feature] Templates API [Type] Bug labels May 22, 2020
oxyc added a commit to oxyc/gutenberg that referenced this issue Jun 20, 2020
oxyc added a commit to oxyc/gutenberg that referenced this issue Jul 2, 2020
youknowriad pushed a commit that referenced this issue Jul 27, 2020
…locked (#23330)

* fix #22550 and allow enter to insert line breaks in richtext

* add e2e test

* Restore isSelected condition

Co-authored-by: Ella van Durpe <ella@vandurpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Templates API [Type] Bug
Projects
None yet
Development

No branches or pull requests

2 participants