image.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 image/image
  7. */
  8. import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
  9. import ImageEditing from '../src/image/imageediting';
  10. import Widget from '@ckeditor/ckeditor5-widget/src/widget';
  11. import ImageTextAlternative from './imagetextalternative';
  12. import '../theme/image.css';
  13. /**
  14. * The image plugin.
  15. *
  16. * For a detailed overview, check the {@glink features/image image feature} documentation.
  17. *
  18. * This is a "glue" plugin which loads the following plugins:
  19. *
  20. * * {@link module:image/image/imageediting~ImageEditing},
  21. * * {@link module:image/imagetextalternative~ImageTextAlternative}.
  22. *
  23. * Usually, it is used in conjuction with other plugins from this package. See the {@glink api/image package page}
  24. * for more information.
  25. *
  26. * @extends module:core/plugin~Plugin
  27. */
  28. export default class Image extends Plugin {
  29. /**
  30. * @inheritDoc
  31. */
  32. static get requires() {
  33. return [ ImageEditing, Widget, ImageTextAlternative ];
  34. }
  35. /**
  36. * @inheritDoc
  37. */
  38. static get pluginName() {
  39. return 'Image';
  40. }
  41. }
  42. /**
  43. * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.
  44. *
  45. * Read more in {@link module:image/image~ImageConfig}.
  46. *
  47. * @member {module:image/image~ImageConfig} module:core/editor/editorconfig~EditorConfig#image
  48. */
  49. /**
  50. * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.
  51. *
  52. * ClassicEditor
  53. * .create( editorElement, {
  54. * image: ... // Image feature options.
  55. * } )
  56. * .then( ... )
  57. * .catch( ... );
  58. *
  59. * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
  60. *
  61. * @interface ImageConfig
  62. */