'#theme_wrappers',
];
// Move this element into sub-element 'value'.
unset($element['value'
]);
foreach (Element::
properties($element) as $key) { if (!
in_array($key,
$keys_not_to_copy)) { $element['value'
][$key] =
$element[$key];
} } $element['value'
]['#type'
] =
$element['#base_type'
];
$element['value'
] +=
static::
elementInfo()->
getInfo($element['#base_type'
]);
// Make sure the #default_value key is set, so we can use it below.
$element['value'
] +=
['#default_value' => ''
];
// Turn original element into a text format wrapper.
$element['#attached'
]['library'
][] = 'filter/drupal.filter';
// Setup child container for the text format widget.
$element['format'
] =
[ '#type' => 'container',
'#theme_wrappers' =>
[ 'container__text_format_filter_wrapper',
],