Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand Down
8 changes: 8 additions & 0 deletions plugins/editors/none/src/Provider/EditorNoneProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down