<p>This is the solution</p>

<pre><code>$('.CodeMirror &gt; div &gt; textarea').attr('readonly','readonly');
</code></pre>

<p>in init{} redactor calback</p>

CC BY-SA 3.0
2017-02-27T12:32:46.657Z
2017-02-27T12:32:46.657Z
Carlos Vieira
<p>I have redactor with plugin code mirror installed
however i want to put code mirror read only.</p>

<p>How can i do that the read only?
Thanks in advance.
Carlos Vieira</p>

<redactor>
Redactor plugin Code Mirror read only
# Redactor plugin Code Mirror read only

(Asked by: username_0 on 2017-02-27)

I have redactor with plugin code mirror installed
however i want to put code mirror read only.

How can i do that the read only?
Thanks in advance.
Carlos Vieira

**Tags:** redactor

---

## 1 answers

### Answer by username_0 on 2017-02-27. Score: 1

This is the solution
$('.CodeMirror > div > textarea').attr('readonly','readonly');

in init{} redactor calback


---

