Formatted text fields do not select from allowed value for text format

Created on 21 May 2024, about 1 month ago

Problem/Motivation

When attempting to any content block to a layout which contains a richtext field (for example Basic Content), the block create form that opens in a modal shows selects for text formats under the rich text fields. As long as no text format is selected, the form cannot be submitted.

That those selects are visible is wrong because many of those fields have only format available and in such a case the format dropdown shouldn't be visible but just have this format pre-selected. It's also wrong that no format is pre-selected at all and until a format is selected, these selects prevent the form from being submitted.

Steps to reproduce

  • Setup limitations on the text format for the Basic Content block
  • Navigate to /node/{nid}/layout
  • At the top of the layout add a block of type Basic Content
  • Observe that the text format select dropdowns are rendered and have not default value

Proposed resolution

The field_sample_value module selects the format (and while we're at it, limits the length of the sample content). Should we put an optional dependency on that module to help with sample data?

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

heddn Nicaragua

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

Comments & Activities

Production build 0.69.0 2024