Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>CKEditor Sample</title>
- <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
- <script type="text/javascript">
- function othertext() {
- document.getElementById('button').value = 'xxx';
- document.getElementById('noteditor').innerHTML = '<h1>Hello other world!</h1><p>I'm also an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>';
- document.getElementById('editor').innerHTML = '<h1>Hello other world!</h1><p>I'm also an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>';
- CKEDITOR.replace('editor1');
- }
- </script>
- </head>
- <body id="main">
- <input type="button" id="button" onclick="othertext();" value="NewText" />
- <br>
- <textarea id=noteditor>
- <h1>
- Hello world!
- </h1>
- <p>
- I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.
- </p>
- </textarea>
- <br>
- <textarea name=text id=editor>
- <h1>
- Hello world!
- </h1>
- <p>
- I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.
- </p>
- </textarea>
- <script type="text/javascript">
- CKEDITOR.replace('editor');
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement