lists-basic.js 1.1 KB

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