Es wäre großartig, wenn wir das Ace-Editorfeld mit dem deaktivierten Attribut deaktivieren könnten, ähnlich wie bei einem Textfeld:
<textarea rows="3" cols="25" disabled="disabled">
This textarea is grayed out and disabled for interaction.
</textarea>
Das nächste, was wir bereits in Ace haben, ist die Eigenschaft "readonly" (editor.setReadonly(true))
Danke, das reicht.
FYI es ist editor.setReadOnly (true)
Ace
-Editor?editor.setReadOnly(true);
https://stackoverflow.com/questions/24757506/how-to-disable-in-ace-editor-the-selection
nicht für diese Situation?
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable
Ich kann nicht schreiben, aber Text löschen, nachdem setReadOnly(true) verwendet wurde.
Hilfreichster Kommentar
FYI es ist editor.setReadOnly (true)