diff --git a/src/Forms/HTMLEditor/HTMLEditorField.php b/src/Forms/HTMLEditor/HTMLEditorField.php
index 5e64ed0386c..2675875d6ab 100644
--- a/src/Forms/HTMLEditor/HTMLEditorField.php
+++ b/src/Forms/HTMLEditor/HTMLEditorField.php
@@ -114,19 +114,22 @@ public function __construct($name, $title = null, $value = '', $config = null)
public function getAttributes()
{
+ $config = $this->getEditorConfig();
// Fix CSS height based on rows
$rowHeight = $this->config()->get('fixed_row_height');
$attributes = [];
- if ($rowHeight) {
+ if ($rowHeight && ($config instanceof TinyMCEConfig)) {
$height = $this->getRows() * $rowHeight;
$attributes['style'] = sprintf('height: %dpx;', $height);
+ $config = clone $config;
+ $config->setOption('height', 'auto');
}
// Merge attributes
return array_merge(
$attributes,
parent::getAttributes(),
- $this->getEditorConfig()->getAttributes()
+ $config->getAttributes()
);
}