Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>have you tried <a href="http://rev.ckeditor.com/ckeditor/trunk/7664/_samples/readonly.html" rel="nofollow">this</a> ?</p> <p>they say, that this should work</p> <pre><code>var editor; // The instanceReady event is fired, when an instance of CKEditor has finished // its initialization. CKEDITOR.on( 'instanceReady', function( ev ) { editor = ev.editor; // Show this "on" button. document.getElementById( 'readOnlyOn' ).style.display = ''; // Event fired when the readOnly property changes. editor.on( 'readOnly', function() { document.getElementById( 'readOnlyOn' ).style.display = this.readOnly ? 'none' : ''; document.getElementById( 'readOnlyOff' ).style.display = this.readOnly ? '' : 'none'; }); }); function toggleReadOnly( isReadOnly ) { // Change the read-only state of the editor. // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly editor.setReadOnly( isReadOnly ); } </code></pre> <p>and html</p> <pre><code>&lt;form action="sample_posteddata.php" method="post"&gt; &lt;p&gt; &lt;textarea class="ckeditor" id="editor1" name="editor1" cols="100" rows="10"&gt;&amp;lt;p&amp;gt;This is some &amp;lt;strong&amp;gt;sample text&amp;lt;/strong&amp;gt;. You are using &amp;lt;a href="http://ckeditor.com/"&amp;gt;CKEditor&amp;lt;/a&amp;gt;.&amp;lt;/p&amp;gt;&lt;/textarea&gt; &lt;/p&gt; &lt;p&gt; &lt;input id="readOnlyOn" onclick="toggleReadOnly();" type="button" value="Make it read-only" style="display:none" /&gt; &lt;input id="readOnlyOff" onclick="toggleReadOnly( false );" type="button" value="Make it editable again" style="display:none" /&gt; &lt;/p&gt; &lt;/form&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload