Allow textarea widgets to be used for text (formatted) fields

Created on 23 February 2023, over 1 year ago
Updated 11 April 2023, about 1 year ago

Problem/Motivation

I would like to use a Text (formatted) field to create a "Description" field appropriate for an og:description meta tag, since we typically want to limit those to 100-300 characters max, and also want it to allow HTML tags since it could be used for display. It is not possible to use a textarea/CKEditor widget for these fields without https://www.drupal.org/project/textarea_widget_for_text β†’

Steps to reproduce

  • Create a new "Text (formatted)" field to a node type
  • Move to the "Manage Display" tab and observe you can only use the "Text field" widget

Proposed resolution

Allow the use of the "Text area (multiple rows)" widget

Remaining tasks

  • Are there any issues with validation? Can we make the user experience better for CKEditor where there is a #maxlength on the textarea source field? Maybe something like https://www.drupal.org/project/ckwordcount β†’ or propose CKEditor shows something if #maxlength is reached in the WYSIWYG?

User interface changes

The new widget is available in the "Manage Display" form.

API changes

None

Data model changes

None

Release notes snippet

✨ Feature request
Status

Needs work

Version

10.1 ✨

Component
TextΒ  β†’

Last updated 9 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States Dave Reid Nebraska πŸ‡ΊπŸ‡Έ

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024