Fixing the Source Editor in Drupal’s Layout Builder

When you’re using Layout Builder, add any block with a body field, and click on “Source”, you’ve probably been frustrated with seeing only one visible line of code. There is no way to re-size it and you’ve probably resorted to copying and pasting into a text editor.

The solution is REALLY simple – two lines of CSS.

Thanks to a Bert Vivie over in the Drupal Slack channel for highlighting the fix (https://drupal.slack.com/archives/C01GWN3QYJD/p1734535996571379?thread_ts=1734187583.815979&cid=C01GWN3QYJD)

Now for the code:
.ck-content {
color: #000!important;
}
.ck-source-editing-area textarea {
height: 100%!important;
}

For more great insights to Layout Builder for Drupal – head over to https://ostraining.com

Similar Posts

  • – YouTube

    Subscribe for More: https://www.youtube.com/@wtwb?sub_confirmation=1 0:00 Intro & Benefits of Using Plugins0:25 Where to install a plugin…

  • – YouTube

    It’s always great when open-source people can get together and learn and talk about their favorite…

  • – YouTube

    Subscribe for More: https://www.youtube.com/@wtwb?sub_confirmation=1 In this video, Brett from @wtwb demonstrates a simple method to update…

  • – YouTube

    Subscribe for More: https://www.youtube.com/@wtwb?sub_confirmation=1 In this video, we take you through the entire process of setting…

  • – YouTube

    Drupal 11 is set to drop sometime this year (either July or November). A new administration…

  • – YouTube

    Core Experimental modules in Drupal are designed to become part of Core at some point. For…