Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 6 additions & 1 deletion plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ public function display(string $name, string $content = '', array $attributes =
$externalPlugins = [];
$theme = 'silver';

// Reset the old default 750px width of the editor to 100%
if (!$width || $width === '750px' || $width === '750') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should become obsolete if PR #47326 gets accepted.

$width = '100%';
}

// Register assets
$wa->getRegistry()->addExtensionRegistryFile('plg_editors_tinymce');

Expand Down Expand Up @@ -531,7 +536,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