How to disable phone keyboard pop-up using Monaco Editor?

66 views Asked by At

On any device, I'd like to have the Monaco Editor as read-only and when using a mobile device and the user clicks into the editor, the mobile keyboard (iOS/Android) shouldn't pop-up. How to do that?

Setting readOnly: true doesn't prevent the keyboard to show.

1

There are 1 answers

0
wirekang On BEST ANSWER

Setting readOnly with domReadOnly will completely prevent mobile keyboard.

editor.updateOptions({ readOnly: true, domReadOnly: true })

MonacoEditorPlaygroundLink