easyimage.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 easy-image/easyimage
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. import CloudServicesUploadAdapter from './cloudservicesuploadadapter';
  10. import Image from '@ckeditor/ckeditor5-image/src/image';
  11. import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload';
  12. /**
  13. * The Easy Image feature, which makes the image upload in CKEditor 5 possible with virtually zero
  14. * server setup. A part of the [CKEditor Cloud Services](https://ckeditor.com/ckeditor-cloud-services/)
  15. * family.
  16. *
  17. * This is a "glue" plugin which enables:
  18. *
  19. * * {@link module:image/image~Image},
  20. * * {@link module:image/imageupload~ImageUpload},
  21. * * {@link module:easy-image/cloudservicesuploadadapter~CloudServicesUploadAdapter}.
  22. *
  23. * See the {@glink features/image-upload/easy-image "Easy Image integration" guide} to learn how to configure
  24. * and use this feature.
  25. *
  26. * Check out the {@glink features/image-upload/image-upload comprehensive "Image upload" guide} to learn about
  27. * other ways to upload images into CKEditor 5.
  28. *
  29. * **Note**: After enabling the Easy Image plugin you need to configure the
  30. * [CKEditor Cloud Services](https://ckeditor.com/ckeditor-cloud-services/)
  31. * integration through {@link module:cloud-services/cloudservices~CloudServicesConfig `config.cloudServices`}.
  32. *
  33. * @extends module:core/plugin~Plugin
  34. */
  35. export default class EasyImage extends Plugin {
  36. /**
  37. * @inheritDoc
  38. */
  39. static get requires() {
  40. return [
  41. CloudServicesUploadAdapter,
  42. Image,
  43. ImageUpload
  44. ];
  45. }
  46. /**
  47. * @inheritDoc
  48. */
  49. static get pluginName() {
  50. return 'EasyImage';
  51. }
  52. }