Add a field for text alignment

This commit is contained in:
Oliver Davies 2025-07-04 08:27:59 +01:00
parent fb3b58cf97
commit c816e90e06
7 changed files with 82 additions and 5 deletions

View file

@ -5,6 +5,7 @@ dependencies:
config:
- block_content.type.basic
- field.field.block_content.basic.body
- field.field.block_content.basic.field_text_alignment
module:
- text
_core:
@ -24,6 +25,12 @@ content:
placeholder: ''
show_summary: false
third_party_settings: { }
field_text_alignment:
type: options_select
weight: 26
region: content
settings: { }
third_party_settings: { }
info:
type: string_textfield
weight: -5

View file

@ -5,7 +5,9 @@ dependencies:
config:
- block_content.type.basic
- field.field.block_content.basic.body
- field.field.block_content.basic.field_text_alignment
module:
- options
- text
_core:
default_config_hash: hBNNDTFwakREOTa6GGMqN899Iyrii0hInwSJtQ7Kj30
@ -21,4 +23,11 @@ content:
third_party_settings: { }
weight: 0
region: content
field_text_alignment:
type: list_default
label: above
settings: { }
third_party_settings: { }
weight: 1
region: content
hidden: { }

View file

@ -0,0 +1,23 @@
uuid: 452b60fa-6916-4432-9b04-f9a2c8e58485
langcode: en
status: true
dependencies:
config:
- block_content.type.basic
- field.storage.block_content.field_text_alignment
module:
- options
id: block_content.basic.field_text_alignment
field_name: field_text_alignment
entity_type: block_content
bundle: basic
label: 'Text alignment'
description: ''
required: true
translatable: false
default_value:
-
value: left
default_value_callback: ''
settings: { }
field_type: list_string

View file

@ -0,0 +1,27 @@
uuid: 6deb7b46-7e0a-44da-9702-c78688cbca6e
langcode: en
status: true
dependencies:
module:
- block_content
- options
id: block_content.field_text_alignment
field_name: field_text_alignment
entity_type: block_content
type: list_string
settings:
allowed_values:
-
value: left
label: Left
-
value: centre
label: Centre
allowed_values_function: ''
module: options
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false