text-alignment.js 798 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /* globals ClassicEditor, console, window, document */
  6. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-text-alignment' ), {
  9. toolbar: {
  10. items: [
  11. 'heading',
  12. '|',
  13. 'bulletedList',
  14. 'numberedList',
  15. '|',
  16. 'outdent',
  17. 'indent',
  18. '|',
  19. 'alignment',
  20. 'undo',
  21. 'redo'
  22. ],
  23. viewportTopOffset: window.getViewportTopOffsetConfig()
  24. },
  25. cloudServices: CS_CONFIG
  26. } )
  27. .then( editor => {
  28. window.editor = editor;
  29. } )
  30. .catch( err => {
  31. console.error( err.stack );
  32. } );