diff --git a/src/Forms/HTMLEditor/HTMLEditorField.php b/src/Forms/HTMLEditor/HTMLEditorField.php
index 5e64ed038..2675875d6 100644
--- a/src/Forms/HTMLEditor/HTMLEditorField.php
+++ b/src/Forms/HTMLEditor/HTMLEditorField.php
@@ -114,19 +114,22 @@ class HTMLEditorField extends TextareaField
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()
);
}