Is there an option to limit the number of line on CodeMirror6?

Hi, I want to create an input box with a CodeMirror6 editor but just one line, no more, is that possible?

Thanks!

Use a changeFilter to block any change that creates a second line.