AutoP Should Be Extensible For Custom Web Elements

Created on 6 November 2015, over 9 years ago
Updated 21 June 2025, 3 days ago

With Drupal embracing HTML5, we seem to have forgot one thing - Custom Elements. While we can define these in CKEditor by adding them to CKEDITOR.dtd, we have no way to extend these inside of autop. Currently all block level elements are hardcoded:

 $block = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|input|p|h[1-6]|fieldset|legend|hr|article|aside|details|figcaption|figure|footer|header|hgroup|menu|nav|section|summary)';

For uniformity of HTML5 support, we should make this list extensible, preferably through a hook_autop_blocks_alter. This would allow modules to modify the list of block level elements, while maintaining backwards compatibility.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

filter.module

Created by

πŸ‡ΊπŸ‡ΈUnited States Jamie Holly

Live updates comments and jobs are added and updated live.
  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

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

    Thank you for sharing your idea for improving Drupal.

    We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024