todo-list.js 976 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /* globals console, window, document */
  6. import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';
  7. import ClassicEditor from '@ckeditor/ckeditor5-build-classic/src/ckeditor';
  8. // import TodoList from '@ckeditor/ckeditor5-list/src/todolist';
  9. // ClassicEditor.builtinPlugins.push( TodoList );
  10. ClassicEditor
  11. .create( document.querySelector( '#snippet-todo-list' ), {
  12. cloudServices: CS_CONFIG,
  13. toolbar: {
  14. items: [
  15. 'heading',
  16. '|',
  17. 'bulletedList',
  18. 'numberedList',
  19. // 'todoList',
  20. '|',
  21. 'link',
  22. 'insertTable',
  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. } );