Refine CKEditor 5 Source Editing settings #description to attributes support

Created on 13 December 2023, over 1 year ago
Updated 5 May 2024, 12 months ago

When configuring ckeditor specifically from the source editing tab, the description reads as follows:

A list of HTML tags that can be used while editing source. It is only necessary to add tags that are not already supported by other enabled plugins. For example, if "Bold" is enabled, it is not necessary to add the <strong> tag, but it may be necessary to add <dl><dt><dd> in a format that does not have a definition list plugin, but requires definition list markup.

However, this does not mention:

1. That you can also use this pane to add custom attributes
2. How you can also override elements that are already predefined. e.g. h2, h3, h4, etc

Here is an example of the sort of syntax that can be entered here:

<figure> <figcaption> <cite> <blockquote cite> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>

Another example can be found in the default config of the Standard install profileโ€™s โ€œBasic HTMLโ€:

    ckeditor5_sourceEditing:
      allowed_tags:
        - '<cite>'
        - '<dl>'
        - '<dt>'
        - '<dd>'
        - '<a hreflang>'
        - '<blockquote cite>'
        - '<ul type>'
        - '<ol type>'
        - '<h2 id>'
        - '<h3 id>'
        - '<h4 id>'
        - '<h5 id>'
        - '<h6 id>'
๐Ÿ“Œ Task
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
CKEditor 5ย  โ†’

Last updated about 4 hours ago

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom 2dareis2do

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024