| 1 | <!DOCTYPE html> |
|---|
| 2 | <!-- |
|---|
| 3 | Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. |
|---|
| 4 | For licensing, see LICENSE.html or http://ckeditor.com/license |
|---|
| 5 | --> |
|---|
| 6 | <html> |
|---|
| 7 | <head> |
|---|
| 8 | <script src="../ckeditor.js"></script> |
|---|
| 9 | <script> |
|---|
| 10 | var editor; |
|---|
| 11 | |
|---|
| 12 | CKEDITOR.on( 'instanceReady', function( ev ) { |
|---|
| 13 | editor = ev.editor; |
|---|
| 14 | editor.setReadOnly(); |
|---|
| 15 | }); |
|---|
| 16 | |
|---|
| 17 | function derp() { |
|---|
| 18 | editor.setData("<p>Lorem ipsum dolor sit amet</p>", function() { |
|---|
| 19 | editor.setReadOnly(false); |
|---|
| 20 | }); |
|---|
| 21 | } |
|---|
| 22 | </script> |
|---|
| 23 | </head> |
|---|
| 24 | <body> |
|---|
| 25 | <textarea class="ckeditor" id="editor1" name="editor1" cols="100" rows="10"><p>ReadOnly.</p></textarea> |
|---|
| 26 | <button onclick="derp()" value="Clickme">Unleash</button> |
|---|
| 27 | </body> |
|---|
| 28 | </html> |
|---|