Ace: Ability to disable Ace editor box

Created on 31 Aug 2011  ·  6Comments  ·  Source: ajaxorg/ace

It would be great if we could disabled the Ace editor box with the disabled attribute, similar to what's available with a textarea:

<textarea rows="3" cols="25" disabled="disabled">
This textarea is grayed out and disabled for interaction.
</textarea>

Most helpful comment

FYI it is editor.setReadOnly(true)

All 6 comments

The closest thing we already have in Ace is the "readonly" property (editor.setReadonly(true))

Thanks, that'll do.

FYI it is editor.setReadOnly(true)

Q: How to disable the Ace editor edit?

A: editor.setReadOnly(true);

https://stackoverflow.com/questions/24757506/how-to-disable-in-ace-editor-the-selection

i can't wirte but can delete text after use setReadOnly(true).

Was this page helpful?
0 / 5 - 0 ratings