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

Created on 23 February 2023, over 1 year ago
Updated 20 September 2024, about 2 months 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 review

Version

11.0 🔥

Component
Text 

Last updated 9 days ago

Created by

🇺🇸United States dave reid Nebraska USA

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024