custom-text-alignment-toolbar.js 759 B

12345678910111213141516171819202122232425
  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-custom-text-alignment-toolbar' ), {
  9. toolbar: {
  10. items: [
  11. 'heading', '|', 'alignment:left', 'alignment:right', 'alignment:center', 'alignment:justify'
  12. ],
  13. viewportTopOffset: window.getViewportTopOffsetConfig()
  14. },
  15. cloudServices: CS_CONFIG
  16. } )
  17. .then( editor => {
  18. window.editor = editor;
  19. } )
  20. .catch( err => {
  21. console.error( err.stack );
  22. } );