codemirror-promql icon indicating copy to clipboard operation
codemirror-promql copied to clipboard

How to make the editor read only?

Open puneeth8994 opened this issue 5 years ago • 2 comments

Is there a way to make the editor read only?

I can see the readOnly option in code mirror but not sure about how to use it using this library.

puneeth8994 avatar May 31 '21 09:05 puneeth8994

Yeah, just include this in your CodeMirror extensions, alongside the PromQL extension:

EditorView.editable.of(false)

juliusv avatar May 31 '21 10:05 juliusv

Closing the issue here since it's not related to the extension directly, but hoping it solves your question!

juliusv avatar May 31 '21 10:05 juliusv