highlight-buttons.js 747 B

1234567891011121314151617181920212223242526
  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. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-highlight-buttons' ), {
  9. cloudServices: CS_CONFIG,
  10. toolbar: {
  11. items: [
  12. 'heading', '|', 'highlight:yellowMarker', 'highlight:greenMarker', 'highlight:pinkMarker',
  13. 'highlight:greenPen', 'highlight:redPen', 'removeHighlight', '|', 'undo', 'redo'
  14. ],
  15. viewportTopOffset: 60
  16. }
  17. } )
  18. .then( editor => {
  19. window.editor = editor;
  20. } )
  21. .catch( err => {
  22. console.error( err.stack );
  23. } );