문제

How can I disable mouse usage in codemirror.

I want it to behave like vim editor where the user cannot move anywhere using the mouse.

Thanks in advance.

도움이 되었습니까?

해결책

How about using pointer-events: none; on the editor container?

.CodeMirror {
    pointer-events: none;
}

jsfiddle-icon Demo!

See also

다른 팁

You can register handlers for the mouse events (mostly mousedown), and simply .preventDefault() them to prevent CodeMirror from handling them further.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top