Skip to content
Snippets Groups Projects

remove CKEditor 4 (contrib) and Convert Entity Media Embed

Merged Michael Lee requested to merge ckeditor4 into main
28 files
+ 618
1180
Compare changes
  • Side-by-side
  • Inline
Files
28
+ 33
0
diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php
index c6b9f345a9..9b6031da03 100644
--- a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php
+++ b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php
@@ -115,12 +115,13 @@ private function configureViewModes(EditorInterface $editor) {
if (array_key_exists($view_mode, $bundles_per_view_mode)) {
$specific_bundles = $bundles_per_view_mode[$view_mode];
if ($view_mode == $default_view_mode) {
+ $view_mode_str = strval($view_mode);
$element_style_configuration[] = [
'isDefault' => TRUE,
'name' => $default_view_mode,
'title' => $all_view_modes[$view_mode],
'attributeName' => 'data-view-mode',
- 'attributeValue' => $view_mode,
+ 'attributeValue' => $view_mode_str,
'modelElements' => ['drupalMedia'],
'modelAttributes' => [
'drupalMediaType' => array_keys($media_bundles),
@@ -128,11 +129,12 @@ private function configureViewModes(EditorInterface $editor) {
];
}
else {
+ $view_mode_str = strval($view_mode);
$element_style_configuration[] = [
'name' => $view_mode,
'title' => $all_view_modes[$view_mode],
'attributeName' => 'data-view-mode',
- 'attributeValue' => $view_mode,
+ 'attributeValue' => $view_mode_str,
'modelElements' => ['drupalMedia'],
'modelAttributes' => [
'drupalMediaType' => $specific_bundles,
Loading