font.js 858 B

123456789101112131415161718192021222324252627282930313233343536373839
  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-font' ), {
  9. cloudServices: CS_CONFIG,
  10. toolbar: {
  11. items: [
  12. 'heading',
  13. '|',
  14. 'fontSize',
  15. 'fontFamily',
  16. 'fontColor',
  17. 'fontBackgroundColor',
  18. '|',
  19. 'bulletedList',
  20. 'numberedList',
  21. '|',
  22. 'outdent',
  23. 'indent',
  24. '|',
  25. 'undo',
  26. 'redo'
  27. ],
  28. viewportTopOffset: window.getViewportTopOffsetConfig()
  29. }
  30. } )
  31. .then( editor => {
  32. window.editor = editor;
  33. } )
  34. .catch( err => {
  35. console.error( err.stack );
  36. } );