custom-font-size-numeric-options.js 923 B

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