How to set the maximum line of Theia editor code #13443
Answered
by
msujew
zx616456607
asked this question in
Q&A
-
I am using EditorManager, how to set the maximum number of lines of editor code, such as 9999, beyond the maximum number of lines cannot be written |
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Mar 4, 2024
Replies: 1 comment
-
Hey @zx616456607, The monaco editor doesn't expose any way to limit the number of lines users can write. You might want to raise this as an issue on the monaco/vscode issue board. Aside from that, you might be able to get away to listen to the |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zx616456607
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @zx616456607,
The monaco editor doesn't expose any way to limit the number of lines users can write. You might want to raise this as an issue on the monaco/vscode issue board.
Aside from that, you might be able to get away to listen to the
onDocumentContentChanged
event of each editor and simply callundo
on any change that increases the lines of code after 9999 LoC have been reached.