diff --git a/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php b/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php index eefcf408c4fae..7e9d84070e355 100644 --- a/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php +++ b/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php @@ -91,6 +91,14 @@ public function display(string $name, string $content = '', array $attributes = $asset = $params['asset'] ?? 0; $author = $params['author'] ?? 0; + if (!$width && !$col) { + $width = '100%'; + } + + if (!$height && !$row) { + $height = '500px'; + } + // Must pass the field id to the buttons in this editor. $buttonsStr = $this->displayButtons($buttons, ['asset' => $asset, 'author' => $author, 'editorId' => $id]); diff --git a/plugins/editors/none/src/Provider/EditorNoneProvider.php b/plugins/editors/none/src/Provider/EditorNoneProvider.php index 69ca239de8088..0c01654dab8f6 100644 --- a/plugins/editors/none/src/Provider/EditorNoneProvider.php +++ b/plugins/editors/none/src/Provider/EditorNoneProvider.php @@ -90,6 +90,14 @@ public function display(string $name, string $content = '', array $attributes = $author = $params['author'] ?? 0; $readonly = !empty($params['readonly']) ? ' readonly disabled' : ''; + if (!$width && !$col) { + $width = '100%'; + } + + if (!$height && !$row) { + $height = '500px'; + } + if (!$id) { $id = $name; } diff --git a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php index 340ebeb7ea927..59bdc68010e48 100644 --- a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php +++ b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php @@ -531,7 +531,7 @@ public function prepareTinyMCEUploadPath(string $path): string 'image_caption' => true, 'importcss_append' => true, 'height' => $this->params->get('html_height', '550px'), - 'width' => $this->params->get('html_width', ''), + 'width' => $this->params->get('html_width', '100%'), 'elementpath' => (bool) $levelParams->get('element_path', true), 'resize' => $resizing, 'external_plugins' => empty($externalPlugins) ? null : $externalPlugins,