indent.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. /**
  6. * @module indent/indent
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. import IndentEditing from './indentediting';
  10. import IndentUI from './indentui';
  11. /**
  12. * The indent feature.
  13. *
  14. * This plugin acts as a single entry point plugin for other features that implement indentation of elements like lists or paragraphs.
  15. *
  16. * The compatible features are:
  17. *
  18. * * The {@link module:list/list~List} or {@link module:list/listediting~ListEditing} feature for list indentation.
  19. * * The {@link module:indent/indentblock~IndentBlock} feature for block indentation.
  20. *
  21. * This is a "glue" plugin that loads the following plugins:
  22. *
  23. * * The {@link module:indent/indentediting~IndentEditing indent editing feature}.
  24. * * The {@link module:indent/indentui~IndentUI indent UI feature}.
  25. *
  26. * The dependent plugins register the `'indent'` and `'outdent'` commands and introduce the `'indent'` and `'outdent'` buttons
  27. * that allow to increase or decrease text indentation of supported elements.
  28. *
  29. * **Note**: In order for the commands and buttons to work, at least one of compatible features is required.
  30. *
  31. * @extends module:core/plugin~Plugin
  32. */
  33. export default class Indent extends Plugin {
  34. /**
  35. * @inheritDoc
  36. */
  37. static get pluginName() {
  38. return 'Indent';
  39. }
  40. /**
  41. * @inheritDoc
  42. */
  43. static get requires() {
  44. return [ IndentEditing, IndentUI ];
  45. }
  46. }