Skip to content

Commit 0bbe224

Browse files
feat: improve CodeEditor dynamic height
- Add viewportMargin: Infinity to render all content - Reduce min-height from 200px to 80px for better UX - Allow editor to grow dynamically with content Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 526dfbc commit 0bbe224

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/CodeEditor.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export default {
6161
tabSize: 4,
6262
indentWithTabs: true,
6363
placeholder: this.placeholder,
64+
viewportMargin: Infinity,
6465
}
6566
},
6667
},
@@ -90,7 +91,7 @@ export default {
9091
9192
.CodeMirror {
9293
height: auto;
93-
min-height: 200px;
94+
min-height: 80px;
9495
font-family: 'Courier New', Courier, monospace;
9596
font-size: 14px;
9697
line-height: 1.5;

0 commit comments

Comments
 (0)