Problem/Motivation
When using a fair number of text fields, the demo text that appears in the content type level layout builder seems a bit much.
Steps to reproduce
While using layout builder
Add some text fields on a content type
Go to the content type level layout builder
See all the demo text for each field, depending on the number of fields could be a lot of scrolling
Proposed resolution
Reduce default text shown
Remaining tasks
Implement
User interface changes
Yes less text
Introduced terminology
NA
API changes
NA
Data model changes
NA
Release notes snippet
NA
Original post
There needs to be something in between toggling "Show content preview" and the amount of characters displayed by lorem ipsum/devel when working with multiple fields.
It's nice to have the content preview so you can confirm that any labels are completed but not have it followed by paragraphs of text
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | Screenshot 2026-03-05 at 9.19.08 PM.png | 231.29 KB | smustgrave |
Issue fork drupal-3093283
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3093283-sample-values
changes, plain diff MR !14992
- 3093283-reduce-default-text
compare
Comments
Comment #8
earthangelconsulting commentedI understand that Drupal is continuing to evolve but... has this issue actually not made it into a priority list anywhere? The first time I tried Layout Builder in Drupal 9, this problem seemed really obvious to me too!
Comment #10
nicxvan commentedI think this actually belongs in the devel module.
This definitely isn't an extension system.
Moving it to layout builder for now because the devel module doesn't support issues.
Comment #11
quietone commentedThis does look like an issue for Devel. An issue for Devel, then an issue can be made at https://gitlab.com/drupalspoons/devel/-/issues/new.
There has been only 1 comment supporting this feature, so this could be closed for lack of interest.
I am setting the status at Postponed (maintainer needs more info) to determine if there is interest in adding this to the layout builder module. If we don't receive additional information to help with the issue, it may be closed after three months.
Comment #12
danielvezaI don't believe this is a Layout Builder issue, it's just that Layout builder is exposing this.
If I understand it correctly, the issue thats raised here is that too much sample text is being generated by textarea fields when placed in Layout Builders default layout. We can trace this down to either
StringLongItem::generateSampleValueorTextItemBase::generateSampleValue(based on field type) that both callRandom::paragraphs()without a parameter, which means it will generate 12 paragraphs of sample text.As quietone mentioned, there isn't a lot of activity here to explore making this change at the moment, but just leaving this here as a reference point in case people are interested in exploring this change.
Comment #13
smustgrave commentedI actually think this is actually worth doing. If you have even 3 text fields all that default text can be a lot of scrolling.
Comment #17
danielvezaI still don't think this is a Layout Builder issue, but either way I've pushed up a change that will reduce the amount of paragraghs that Text & String Long fields will generate from 12 to 2.
Comment #18
smustgrave commentedWorked like a charm!
Comment #22
godotislateCommitted 8f8e3ac and pushed to main and committed 9e4a9af and pushed to 11.x.
I was wondering if there's any one out there relying on long text in the preview to check whether their layouts look right, maybe if they're using floats or something. But my guess more people would just create test content to do that instead. Either way, reason enough not backport to 11.3
Thanks everyone!
Comment #24
godotislate