custom-font-family-options.js 828 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
  6. /* globals ClassicEditor, console, window, document */
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-custom-font-family-options' ), {
  9. cloudServices: CS_CONFIG,
  10. toolbar: {
  11. items: [
  12. 'heading', '|', 'fontFamily', 'bulletedList', 'numberedList', 'undo', 'redo'
  13. ],
  14. viewportTopOffset: window.getViewportTopOffsetConfig()
  15. },
  16. fontFamily: {
  17. options: [
  18. 'default',
  19. 'Ubuntu, Arial, sans-serif',
  20. 'Ubuntu Mono, Courier New, Courier, monospace'
  21. ]
  22. }
  23. } )
  24. .then( editor => {
  25. window.editor = editor;
  26. } )
  27. .catch( err => {
  28. console.error( err.stack );
  29. } );