Verified Commit 82576b60 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #784672 by smustgrave, floretan, lokapujya, joegraduate, jcnventura,...

Issue #784672 by smustgrave, floretan, lokapujya, joegraduate, jcnventura, AndyF, joelpittet, darvanen, c960657, eiriksm, viappidu, jungle, ravi.shankar, DanielVeza, Meenakshi_j, gordon, raman.b, mohit_aghera, vsujeetkumar, aleevas, vakulrai, bruvers, larowlan, vpeltot, wjaspers, Sonal.Sangale, jan.stoeckler, jofitz, vdsh, minorOffense, LewisNyman, mgifford, Berdir, tstoeckler, Luke.Leber, Hanno, alexpott, andypost, yannickoo, hchonov, quietone, David_Rothstein, fgm, mr.baileys, MaxMendez, mpp: Allow text field to enforce a specific text format
parent e2d4dcfd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -94,7 +94,10 @@ function block_content_add_body_field($block_type_id, $label = 'Body') {
      'field_storage' => FieldStorageConfig::loadByName('block_content', 'body'),
      'bundle' => $block_type_id,
      'label' => $label,
      'settings' => ['display_summary' => FALSE],
      'settings' => [
        'display_summary' => FALSE,
        'allowed_formats' => [],
      ],
    ]);
    $field->save();

+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ source:
      field_name: body
      label: Body
      display_summary: false
      allowed_formats: {  }
  ids:
    entity_type:
      type: string
+1 −0
Original line number Diff line number Diff line
@@ -19,4 +19,5 @@ default_value_callback: ''
settings:
  display_summary: true
  required_summary: false
  allowed_formats: {  }
field_type: text_with_summary
+4 −1
Original line number Diff line number Diff line
@@ -414,7 +414,10 @@ public function doFieldListTest() {
      'field_storage' => FieldStorageConfig::loadByName('block_content', 'body'),
      'bundle' => $block_content_type->id(),
      'label' => 'Body',
      'settings' => ['display_summary' => FALSE],
      'settings' => [
        'display_summary' => FALSE,
        'allowed_formats' => [],
      ],
    ]);
    $field->save();

+4 −0
Original line number Diff line number Diff line
@@ -15,3 +15,7 @@ editor.settings.trex:
    stumpy_arms:
      type: boolean
      label: 'Stumpy arms'

field.field_settings.editor_test_text_long:
  label: 'Filter test text (formatted, long) settings'
  type: field.field_settings.text
Loading