Hide some code line in monaco editor. #4875
Unanswered
saketbihari
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My code contains some metadata text which I want to hide while showing in moncao editor. The model should contain the complete text including metadata texts but editor should only show the actual code text. I tried to hide it using decorators but it only hides the text but line is still present in editor. I used below code:
editor.createDecorationsCollection([{
range: new monaco.Range(1, 1, 13, 1),
options: {
inlineClassName: 'invisible-content',
isWholeLine: true,
}
}])
css:
.invisible-content {
display: none !important;
height: 0 !important;
overflow: hidden !important;
opacity: 0 !important;
position: absolute !important;
line-height: 0 !important;
pointer-events: none !important;
}
Is there a way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions