custom-font-size-named-options.js 601 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals ClassicEditor, console, window, document */
  6. ClassicEditor
  7. .create( document.querySelector( '#snippet-custom-font-size-named-options' ), {
  8. toolbar: {
  9. items: [
  10. 'headings', 'bulletedList', 'numberedList', 'fontSize', 'undo', 'redo'
  11. ],
  12. viewportTopOffset: 60
  13. },
  14. fontSize: {
  15. options: [
  16. 'small',
  17. 'normal',
  18. 'big'
  19. ]
  20. }
  21. } )
  22. .then( editor => {
  23. window.editor = editor;
  24. } )
  25. .catch( err => {
  26. console.error( err.stack );
  27. } );