Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CKEditor Sample</title>
  6. <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
  7. <script type="text/javascript">
  8. function othertext() {
  9. document.getElementById('button').value = 'xxx';
  10. document.getElementById('noteditor').innerHTML = '<h1>Hello other world!</h1><p>I&#39;m also an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>';
  11. document.getElementById('editor').innerHTML = '<h1>Hello other world!</h1><p>I&#39;m also an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>';
  12. CKEDITOR.replace('editor1');
  13. }
  14. </script>
  15. </head>
  16. <body id="main">
  17. <input type="button" id="button" onclick="othertext();" value="NewText" />
  18. <br>
  19. <textarea id=noteditor>
  20. <h1>
  21. Hello world!
  22. </h1>
  23. <p>
  24. I&#39;m an instance of <a href="http://ckeditor.com">CKEditor</a>.
  25. </p>
  26. </textarea>
  27. <br>
  28. <textarea name=text id=editor>
  29. <h1>
  30. Hello world!
  31. </h1>
  32. <p>
  33. I&#39;m an instance of <a href="http://ckeditor.com">CKEditor</a>.
  34. </p>
  35. </textarea>
  36. <script type="text/javascript">
  37. CKEDITOR.replace('editor');
  38. </script>
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement