ckeditor-global-version.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CKEditor 5 – classic editor build – global variable test</title>
  6. <style>
  7. body {
  8. max-width: 800px;
  9. margin: 20px auto;
  10. }
  11. </style>
  12. </head>
  13. <body>
  14. <h1>CKEditor 5 – classic editor build – global variable test</h1>
  15. <h2>In the default language</h2>
  16. <div id="editor">
  17. <h2>About CKEditor&nbsp;5</h2>
  18. <p>This is <a href="https://ckeditor.com">CKEditor&nbsp;5</a>.</p>
  19. </div>
  20. <h2>In German</h2>
  21. <div id="editor-de">
  22. <h2>About CKEditor&nbsp;5</h2>
  23. <p>This is <a href="https://ckeditor.com">CKEditor&nbsp;5</a>.</p>
  24. </div>
  25. <script src="../../build/ckeditor.js"></script>
  26. <script src="../../build/translations/de.js"></script>
  27. <script>
  28. ClassicEditor.create( document.querySelector( '#editor' ) )
  29. .then( editor => {
  30. window.editor = editor;
  31. } )
  32. .catch( error => {
  33. console.error( 'There was a problem initializing the editor.', error );
  34. } );
  35. ClassicEditor
  36. .create( document.querySelector( '#editor-de' ), {
  37. language: 'de'
  38. } )
  39. .then( editor => {
  40. window.editor = editor;
  41. } )
  42. .catch( error => {
  43. console.error( 'There was a problem initializing the editor.', error );
  44. } );
  45. </script>
  46. </body>
  47. </html>