readonly.html 393 B

123456789101112131415161718
  1. <div id="editor">
  2. <p>This editor is read-only.</p>
  3. </div>
  4. <button id="toggle">Toggle read-only mode</button>
  5. <script>
  6. exportPdfUtils.initManualTest();
  7. var editor = CKEDITOR.replace( 'editor', exportPdfUtils.getDefaultConfig( 'manual', {
  8. readOnly: true
  9. } ) );
  10. CKEDITOR.document.getById( 'toggle' ).on( 'click', function() {
  11. editor.setReadOnly( !editor.readOnly );
  12. } );
  13. </script>