How can I add padding between the first line of code and top border of Monaco editor?
I have this:
But I need something like this:
How can I add padding between the first line of code and top border of Monaco editor?
I have this:
But I need something like this:
A little late to the party, but this initial option is available (monaco v0.41.0):
const options = {
padding: {
top: 10
}
// more options...
}
monaco.editor.create(anElement, options);
Try
.monaco-editor {
padding-top: 15px;
}
It worked for me
overflow-guard
stays its same height but is just pushed down 15px
. –
Jorgejorgensen © 2022 - 2024 — McMap. All rights reserved.
padding: { top: 25 }
as one of yourmonaco
options – Hambypadding
was not introduced untilv0.21.0
– Jorgejorgensen