Skip to content

Commit

Permalink
TinyMCE should prefer the editor dimensions and fallback to the plugi…
Browse files Browse the repository at this point in the history
…n params
  • Loading branch information
laoneo committed Apr 22, 2022
1 parent 1ee6427 commit fb3cf5b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,9 @@ public function onDisplay(
$valid_elements = trim($levelParams->get('valid_elements', ''));
}

$html_height = $this->params->get('html_height', '550');
$html_width = $this->params->get('html_width', '');
$html_width = $html_width == 750 ? '' : $html_width;
$html_width = $width ?: $this->params->get('html_width', '');
$html_width = is_numeric($html_width) ? $html_width . 'px' : $html_width;
$html_height = $height ?: $this->params->get('html_height', '550');
$html_height = is_numeric($html_height) ? $html_height . 'px' : $html_height;

// The param is true for vertical resizing only, false or both
Expand Down

0 comments on commit fb3cf5b

Please sign in to comment.