indent-block-classes.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
  8. import Indent from '@ckeditor/ckeditor5-core/src/indent';
  9. import IndentBlock from '../../src/indentblock';
  10. ClassicEditor
  11. .create( document.querySelector( '#editor' ), {
  12. plugins: [ ArticlePluginSet, Indent, IndentBlock ],
  13. toolbar: [
  14. 'heading',
  15. '|',
  16. 'indent',
  17. 'outdent',
  18. '|',
  19. 'indentList',
  20. 'outdentList',
  21. '|',
  22. 'indentBlock',
  23. 'outdentBlock',
  24. '|',
  25. 'bulletedList',
  26. 'numberedList',
  27. '|',
  28. 'blockQuote',
  29. 'insertTable',
  30. 'undo',
  31. 'redo'
  32. ],
  33. image: {
  34. toolbar: [ 'imageStyle:full', 'imageStyle:side', '|', 'imageTextAlternative' ]
  35. },
  36. table: {
  37. contentToolbar: [
  38. 'tableColumn',
  39. 'tableRow',
  40. 'mergeTableCells'
  41. ]
  42. },
  43. indentBlock: {
  44. classes: [
  45. 'indent-1',
  46. 'indent-2',
  47. 'indent-3',
  48. 'indent-4'
  49. ]
  50. }
  51. } )
  52. .then( editor => {
  53. window.editor = editor;
  54. } )
  55. .catch( err => {
  56. console.error( err.stack );
  57. } );