Skip to content

Commit 14a21c3

Browse files
author
Augier
authored
Change preview content height setting
Sets `min-height` rather than `height` and sets `height` to `auto`. This improves the preview look. Container will then never be smaller than textarea but will still adapt to the preview content height. Currently, as the height is hardwired, if the preview content is higher than the textarea, a scrollbar appears.
1 parent ac6b63e commit 14a21c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/bootstrap-markdown.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,9 @@
580580

581581
// Set the preview element dimensions
582582
replacementContainer.css({
583-
width: container.outerWidth() + 'px',
584-
height: container.outerHeight() + 'px'
583+
"width": container.outerWidth() + 'px',
584+
"min-height": container.outerHeight() + 'px',
585+
"height": "auto"
585586
});
586587

587588
if (this.$options.resize) {

0 commit comments

Comments
 (0)