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

Rich text toolbar has no item for <hr> horizontal rules #9707

Open
gasman opened this issue Nov 22, 2022 · 3 comments
Open

Rich text toolbar has no item for <hr> horizontal rules #9707

gasman opened this issue Nov 22, 2022 · 3 comments
Labels
Milestone

Comments

@gasman
Copy link
Collaborator

gasman commented Nov 22, 2022

Issue Summary

As per #9281 (comment) - when the 'hr' rich text feature is enabled (which it is as default, according to https://docs.wagtail.org/en/stable/advanced_topics/customisation/page_editing_interface.html#limiting-features-in-a-rich-text-field), there is no item for it in the rich text block-element menu as expected. They can still be inserted by typing ---, but there is no UI indication to make this discoverable.

Steps to Reproduce

  1. On bakerydemo, edit the homepage and go to the paragraph block within Home content block. This does not override the default feature list, so should allow <hr> elements.
  2. Insert a new paragraph and type '/' to open the block menu
  3. An item for horizontal rule should appear within the 'rich text' section, but does not.
  • I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: yes

Technical details

  • Python version: 3.8.0
  • Django version: 4.1.3
  • Wagtail version: 4.2a0
  • Browser version: Chrome 107.0.5304.87 on MacOS
@gasman gasman added type:Bug status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. labels Nov 22, 2022
@gasman gasman modified the milestones: 4.2, 4.1.2 Nov 22, 2022
@RandomJo
Copy link
Contributor

RandomJo commented Dec 9, 2022

I've noticed this too in Wagtail 4.1.1.

@laymonage laymonage removed the status:Unconfirmed Issue, usually a bug, that has not yet been validated as a confirmed problem. label Dec 9, 2022
@sewphl
Copy link

sewphl commented Dec 20, 2022

I am experiencing this in Wagtail 4.1.1.

@gasman gasman modified the milestones: 4.1.2, 5.0 Feb 2, 2023
chosak added a commit to chosak/draftail that referenced this issue Feb 22, 2023
When the command palette is built without a prescribed list of
commands, the horizontal rule is added to the list of entity types,
if it is configured via enableHorizontalRule.

If the command palette is built by passing a list of commands, though,
the horizontal rule is not added. This seems inadvertent and is the
cause of wagtail/wagtail#9707, unless I am
misudnerstanding how this code is supposed to work.
chosak added a commit to chosak/draftail that referenced this issue Feb 22, 2023
When the command palette is built without a prescribed list of
commands, the horizontal rule is added to the list of entity types,
if it is configured via enableHorizontalRule. If the command palette
is built by passing a list of commands, though, enableHorizontalRule is
ignored and the HR is not added to the list of entity types.

This seems inadvertent and causes the HR to get dropped even if it has
been configured. This seems to be the cause of
wagtail/wagtail#9707, unless I am
misunderstanding how this code is supposed to work.
@chosak
Copy link
Member

chosak commented Feb 22, 2023

This might need to be fixed in Draftail: springload/draftail#457

@thibaudcolas thibaudcolas modified the milestones: 5.0, 5.1 Apr 19, 2023
@gasman gasman modified the milestones: 5.1, 5.2 Jul 18, 2023
@gasman gasman modified the milestones: 5.2, 5.3 Oct 13, 2023
@gasman gasman modified the milestones: 6.0, 6.1 Jan 23, 2024
@gasman gasman modified the milestones: 6.1, 6.2 Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

6 participants