ckeditor-amd-version.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CKEditor 5 – classic editor build – RequireJS integration 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 – RequireJS integration test (see <a href="https://github.com/ckeditor/ckeditor5/issues/914">#914</a>)</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="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.js"></script>
  26. <script>
  27. require( [ '../../build/ckeditor.js' ], ( ClassicEditor ) => {
  28. ClassicEditor.create( document.getElementById( '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. } );
  36. require( [ '../../build/ckeditor.js', '../../build/translations/de.js' ], ( ClassicEditor ) => {
  37. ClassicEditor
  38. .create( document.getElementById( 'editor-de' ), {
  39. language: 'de'
  40. } )
  41. .then( editor => {
  42. window.editor = editor;
  43. } )
  44. .catch( error => {
  45. console.error( 'There was a problem initializing the editor.', error );
  46. } );
  47. } );
  48. </script>
  49. </body>
  50. </html>