lists-style.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 window, document, console, ClassicEditor, ListStyle */
  6. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
  7. ClassicEditor
  8. .create( document.querySelector( '#snippet-lists-styles' ), {
  9. extraPlugins: [ ListStyle ],
  10. toolbar: {
  11. items: [
  12. 'heading',
  13. '|',
  14. 'bold',
  15. 'italic',
  16. 'bulletedList',
  17. 'numberedList',
  18. '|',
  19. 'outdent',
  20. 'indent',
  21. '|',
  22. 'link',
  23. 'imageUpload',
  24. 'insertTable',
  25. '|',
  26. 'undo',
  27. 'redo'
  28. ],
  29. viewportTopOffset: window.getViewportTopOffsetConfig()
  30. },
  31. image: {
  32. styles: [
  33. 'full',
  34. 'alignLeft',
  35. 'alignRight'
  36. ],
  37. toolbar: [
  38. 'imageStyle:alignLeft',
  39. 'imageStyle:full',
  40. 'imageStyle:alignRight',
  41. '|',
  42. 'imageTextAlternative'
  43. ]
  44. },
  45. table: {
  46. contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
  47. },
  48. cloudServices: CS_CONFIG
  49. } )
  50. .then( editor => {
  51. window.editorStyles = editor;
  52. } )
  53. .catch( err => {
  54. console.error( err.stack );
  55. } );