Disable replace for readOnly content

Disable the `replace()` when the selected `CodeMirror` is `readOnly`.