diff -u b/src/Form/EntityEmbedDialog.php b/src/Form/EntityEmbedDialog.php --- b/src/Form/EntityEmbedDialog.php +++ b/src/Form/EntityEmbedDialog.php @@ -566,6 +566,23 @@ '#value' => $entity_element['data-entity-uuid'], ); + // TODO: Also set data-entity-embed-display-settings. + $form['attributes']['data-entity-embed-display'] = array( + '#type' => 'hidden', + '#default_value' => $entity_element['data-entity-embed-display'], + '#required' => TRUE, + ); + $form['attributes']['data-align'] = array( + '#type' => 'hidden', + '#default_value' => isset($entity_element['data-align']) ? $entity_element['data-align'] : '', + ); + $form['attributes']['data-caption'] = array( + '#type' => 'hidden', + '#default_value' => isset($entity_element['data-caption']) ? Html::decodeEntities($entity_element['data-caption']) : '', + '#element_validate' => array('::escapeValue'), + ); + + $form['actions'] = array( '#type' => 'actions', );