Skip to content

Commit

Permalink
Add reflect rows attribute of textarea for HTMLField
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 11, 2024
1 parent 50c3ec0 commit 21647e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions private/css/cms.tiptap.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ p:not(.is-empty) > br.ProseMirror-trailingBreak {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border: 1px solid var(--dca-gray-lighter, var(--hairline-color));
box-shadow: none;
border-bottom: none;
.dropdown-content {
inset-block-start: 100%;
Expand Down
3 changes: 3 additions & 0 deletions private/js/cms.tiptap.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ class CMSTipTapPlugin {
if (el.tagName === 'TEXTAREA') {
// Not inline
this._createTopToolbar(editorElement, editor, options);
if (el.rows) {
editorElement.querySelector('.tiptap').style.height = el.rows * 1.5 + 'em';
}
} else {
// Inline
this._createTopToolbar(editorElement, editor, options, 'mark');
Expand Down

0 comments on commit 21647e5

Please sign in to comment.