remove-format.js 739 B

12345678910111213141516171819202122232425262728293031323334353637
  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. ClassicEditor
  7. .create( document.querySelector( '#editor' ), {
  8. toolbar: {
  9. items: [
  10. 'removeformat',
  11. '|',
  12. 'bold',
  13. 'italic',
  14. 'underline',
  15. 'strikethrough',
  16. 'code',
  17. 'subscript',
  18. 'superscript',
  19. 'fontSize',
  20. 'fontFamily',
  21. 'alignment',
  22. 'link',
  23. '|',
  24. 'undo',
  25. 'redo'
  26. ],
  27. viewportTopOffset: window.getViewportTopOffsetConfig()
  28. }
  29. } )
  30. .then( editor => {
  31. window.editor = editor;
  32. } )
  33. .catch( err => {
  34. console.error( err.stack );
  35. } );