image.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  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. * Uses the {@link module:image/image/imageediting~ImageEditing}.
  17. *
  18. * For a detailed overview, check the {@glink features/image image feature} documentation.
  19. *
  20. * @extends module:core/plugin~Plugin
  21. */
  22. export default class Image extends Plugin {
  23. /**
  24. * @inheritDoc
  25. */
  26. static get requires() {
  27. return [ ImageEditing, Widget, ImageTextAlternative ];
  28. }
  29. /**
  30. * @inheritDoc
  31. */
  32. static get pluginName() {
  33. return 'Image';
  34. }
  35. }
  36. /**
  37. * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.
  38. *
  39. * Read more in {@link module:image/image~ImageConfig}.
  40. *
  41. * @member {module:image/image~ImageConfig} module:core/editor/editorconfig~EditorConfig#image
  42. */
  43. /**
  44. * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.
  45. *
  46. * ClassicEditor
  47. * .create( editorElement, {
  48. * image: ... // Image feature options.
  49. * } )
  50. * .then( ... )
  51. * .catch( ... );
  52. *
  53. * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
  54. *
  55. * @interface ImageConfig
  56. */