ckfinderediting.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 ckfinder/ckfinderediting
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. import ImageEditing from '@ckeditor/ckeditor5-image/src/image/imageediting';
  10. import LinkEditing from '@ckeditor/ckeditor5-link/src/linkediting';
  11. import Notification from '@ckeditor/ckeditor5-ui/src/notification/notification';
  12. import CKFinderCommand from './ckfindercommand';
  13. /**
  14. * The CKFinder editing feature. It introduces the {@link module:ckfinder/ckfindercommand~CKFinderCommand CKFinder command}.
  15. *
  16. * @extends module:core/plugin~Plugin
  17. */
  18. export default class CKFinderEditing extends Plugin {
  19. /**
  20. * @inheritDoc
  21. */
  22. static get pluginName() {
  23. return 'CKFinderEditing';
  24. }
  25. /**
  26. * @inheritDoc
  27. */
  28. static get requires() {
  29. return [ Notification, ImageEditing, LinkEditing ];
  30. }
  31. /**
  32. * @inheritDoc
  33. */
  34. init() {
  35. const editor = this.editor;
  36. editor.commands.add( 'ckfinder', new CKFinderCommand( editor ) );
  37. }
  38. }