Skip to content

Commit

Permalink
Fix setting min-height via attributes.
Browse files Browse the repository at this point in the history
We allow setting the min-height via attribute. We need
a setter for this.
  • Loading branch information
tvdeyen committed Jan 3, 2024
1 parent 64f6665 commit bdb0010
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/javascript/alchemy_admin/components/tinymce.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { AlchemyHTMLElement } from "alchemy_admin/components/alchemy_html_elemen
import { currentLocale } from "alchemy_admin/i18n"

class Tinymce extends AlchemyHTMLElement {
#min_height = null

/**
* the observer will initialize Tinymce if the textarea becomes visible
*/
Expand Down Expand Up @@ -120,7 +122,11 @@ class Tinymce extends AlchemyHTMLElement {
}

get minHeight() {
return this.configuration.min_height
return this.#min_height || this.configuration.min_height
}

set minHeight(value) {
this.#min_height = value
}
}

Expand Down

0 comments on commit bdb0010

Please sign in to comment.