Skip to content

How to set the maximum line of Theia editor code #13443

Answered by msujew
zx616456607 asked this question in Q&A
Discussion options

You must be logged in to vote

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 call undo on any change that increases the lines of code after 9999 LoC have been reached.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zx616456607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants