Support lang in WYSIWYG UI without requiring source editing

Created on 14 February 2025, 6 months ago

Problem/Motivation

We don't want to give staff source editing capability. This would help ensure accessible content formatting, a consistent website look, and maintainability when HTML-savvy staff responsible for particular pages are succeeded by non-HTML-savvy staff. We also want staff to be able to easily add jump (anchor) links to a page. However, it appears certain features are only available with source editing.

Steps to reproduce

1. Go to Simplytest.me
2. Create a site in Drupal core 11.x-dev.
3. Go to /admin/config/content/formats/manage/basic_html
4. Note content of fields listing tags.

Result:

Source editing, Manually editable HTML tags contains:
<cite> <dl> <dt> <dd> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>

Limit allowed HTML tags and correct faulty HTML, Allowed HTML tags contains:
<br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol start type> <strong> <em> <code> <li> <img src alt data-entity-uuid data-entity-type height width data-caption data-align>

5. Drag Language from Available buttons to Active toolbar
6. Click Source editing tab
7. Add to list of tags
8. Save configuration
9. Go to /admin/config/content/formats/manage/basic_html
10. Drag Source edit icon from Active toolbar to Available buttons

Desired result: No error
Actual result: Get error that I need to add a tag to source editing or add a plugin that adds the span tag

Proposed resolution

Once I add , keep it.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component

ckeditor5.module

Created by

πŸ‡ΊπŸ‡ΈUnited States charles belov San Francisco, CA, US

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

Comments & Activities

Production build 0.71.5 2024