Can't add class attribute to hr

Created on 1 September 2023, about 1 year ago

Problem/Motivation

You should be able to add id, class, etc., attributes to the hr tag if those attributes have been added to the Source editing, Manually editable HTML tags field.

Steps to reproduce

Add

to the Source editing, Manually editable HTML tags field of a Text format, then add id or class attributes to the source of a Ckeditor field. Clear cache.

Edit a page using the same Text format where you added the

.
πŸ› Bug report
Status

Active

Version

1.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cobasa
  • πŸ‡¨πŸ‡¦Canada slussier

    Same for me. +1

  • πŸ‡¨πŸ‡¦Canada joelpittet Vancouver

    Has this ever worked? I can't do that using core's filter either, I think this is a ckeditor5 issue

  • Status changed to Closed: works as designed 9 months ago
  • πŸ‡¬πŸ‡§United Kingdom duttonma

    I think I can see the problem here.

    You have shown the values that you have set in 'Manually editable HTML tags' under source editing but, assuming that you have enabled this filter ('Limit allowed HTML tags and correct faulty HTML - editable tag list'), you haven't shown the values that you have set in 'Allowed HTML tags'.

    I suspect that you have added

    to source editing but you haven't added it to 'Allowed HTML tags' and the two work in conjunction. If it isn't in 'Allowed HTML tags' then it won't show when you view the node and that's it !
  • πŸ‡ΊπŸ‡ΈUnited States jasonmacer

    I can confirm that I have

    enabled, as when I try to add it in: Home >Administration >Configuration >Content authoring>Text formats and editors, I get this error: The following tag(s) are already supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: Horizontal line (
    ).

    I also do not have the "Limit allowed HTML tags and correct faulty HTML" enabled, yet I am still not able to set a class id an

    element

    Drupal Core Version: 10.2.4

  • πŸ‡ΊπŸ‡ΈUnited States irodriguez

    Has this ever been resolved? I am still experiencing this problem.

  • Status changed to Active about 1 month ago
  • πŸ‡¨πŸ‡¦Canada franknoel

    Same issue on 10.3.6, this has not been resolved.

Production build 0.71.5 2024