custom-text-alignment-options.js 718 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals ClassicEditor, console, window, document */
  6. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloudservices/tests/_utils/cloudservices-config';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-custom-text-alignment-options' ), {
  9. toolbar: {
  10. items: [
  11. 'headings', '|', 'bulletedList', 'numberedList', 'alignmentDropdown', 'undo', 'redo'
  12. ],
  13. viewportTopOffset: 60
  14. },
  15. alignment: {
  16. options: [ 'left', 'right' ]
  17. },
  18. cloudServices: CS_CONFIG
  19. } )
  20. .then( editor => {
  21. window.editor = editor;
  22. } )
  23. .catch( err => {
  24. console.error( err.stack );
  25. } );