custom-indent-block-classes.js 935 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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-indent-block-classes' ), {
  9. cloudServices: CS_CONFIG,
  10. toolbar: {
  11. items: [
  12. 'heading',
  13. '|',
  14. 'outdent',
  15. 'indent',
  16. '|',
  17. 'bulletedList',
  18. 'numberedList',
  19. '|',
  20. 'code',
  21. '|',
  22. 'undo',
  23. 'redo'
  24. ],
  25. viewportTopOffset: window.getViewportTopOffsetConfig()
  26. },
  27. indentBlock: {
  28. classes: [
  29. 'custom-block-indent-a',
  30. 'custom-block-indent-b',
  31. 'custom-block-indent-c'
  32. ]
  33. }
  34. } )
  35. .then( editor => {
  36. window.editor = editor;
  37. } )
  38. .catch( err => {
  39. console.error( err.stack );
  40. } );