or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

commands.mdcore-functionality.mdimage-captions.mdimage-insertion.mdimage-resizing.mdimage-styling.mdimage-text-alternative.mdimage-upload.mdindex.mdutility-functions.md
tile.json

core-functionality.mddocs/

Core Image Functionality

Essential image plugins providing base image support with block and inline image types, automatic type detection, and widget integration.

Capabilities

Image Plugin

Main image plugin that provides both block and inline image functionality.

/**
 * Main image plugin that loads both block and inline image functionality
 */
class Image {
  static pluginName: 'Image';
  static requires: [ImageBlock, ImageInline];
  static isOfficialPlugin: true;
}

Usage:

import { Image } from '@ckeditor/ckeditor5-image';
import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic';

ClassicEditor
  .create(document.querySelector('#editor'), {
    plugins: [Image],
    toolbar: ['imageUpload']
  });

ImageBlock Plugin

Block image functionality with figure wrapper and caption support.

/**
 * Block image functionality with figure wrapper and caption support
 */
class ImageBlock {
  static pluginName: 'ImageBlock';
  static requires: [ImageBlockEditing, Widget, ImageTextAlternative, ImageInsertUI];
  static isOfficialPlugin: true;
}

ImageInline Plugin

Inline image functionality for images within text content.

/**
 * Inline image functionality for images within text content
 */
class ImageInline {
  static pluginName: 'ImageInline';
  static requires: [ImageInlineEditing, Widget, ImageTextAlternative, ImageInsertUI];
  static isOfficialPlugin: true;
}

ImageEditing Plugin

Common image editing functionality shared between block and inline images.

/**
 * Common image editing functionality shared between block and inline images
 */
class ImageEditing {
  static pluginName: 'ImageEditing';
  static requires: [ImageUtils, Clipboard, ImageLoadObserver];
  static isOfficialPlugin: true;
}

ImageBlockEditing Plugin

Block image editing functionality with schema and converters.

/**
 * Block image editing functionality with schema and converters
 */
class ImageBlockEditing {
  static pluginName: 'ImageBlockEditing';
  static requires: [ImageEditing, ImageUtils, ImagePlaceholder, PictureEditing];
  static isOfficialPlugin: true;
}

ImageInlineEditing Plugin

Inline image editing functionality with schema and converters.

/**
 * Inline image editing functionality with schema and converters
 */
class ImageInlineEditing {
  static pluginName: 'ImageInlineEditing';
  static requires: [ImageEditing, ImageUtils, ImagePlaceholder, PictureEditing];
  static isOfficialPlugin: true;
}

ImagePlaceholder Plugin

Placeholder functionality during image loading to prevent layout shifts.

/**
 * Placeholder functionality during image loading to prevent layout shifts
 */
class ImagePlaceholder {
  static pluginName: 'ImagePlaceholder';
  static requires: [ImageUtils];
  static isOfficialPlugin: true;
}

AutoImage Plugin

Automatically converts pasted image URLs into image elements.

/**
 * Automatically converts pasted image URLs into image elements
 */
class AutoImage {
  static pluginName: 'AutoImage';
  static requires: [Clipboard, ImageUtils, Undo];
  static isOfficialPlugin: true;
}

Usage:

import { AutoImage } from '@ckeditor/ckeditor5-image';

ClassicEditor
  .create(document.querySelector('#editor'), {
    plugins: [AutoImage],
    // URLs pasted into the editor will automatically become images
  });

ImageSizeAttributes Plugin

Enables width and height attributes for images to prevent layout shifts.

/**
 * Enables width and height attributes for images to prevent layout shifts
 */
class ImageSizeAttributes {
  static pluginName: 'ImageSizeAttributes';
  static requires: [ImageUtils];
  static isOfficialPlugin: true;
}

ImageToolbar Plugin

Contextual toolbar for selected images with customizable button configuration.

/**
 * Contextual toolbar for selected images with customizable button configuration
 */
class ImageToolbar {
  static pluginName: 'ImageToolbar';
  static requires: [WidgetToolbarRepository, ImageUtils];
  static isOfficialPlugin: true;
}

Configuration:

ClassicEditor
  .create(document.querySelector('#editor'), {
    image: {
      toolbar: [
        'imageTextAlternative',
        'toggleImageCaption',
        '|',
        'imageStyle:inline',
        'imageStyle:wrapText',
        'imageStyle:breakText',
        '|',
        'resizeImage'
      ]
    }
  });

PictureEditing Plugin

HTML5 picture element support with responsive images and multiple source formats.

/**
 * HTML5 picture element support with responsive images and multiple source formats
 */
class PictureEditing {
  static pluginName: 'PictureEditing';
  static requires: [ImageEditing, ImageUtils];
  static isOfficialPlugin: true;
}

Image Load Observer

Observer that watches for image loading events and triggers layout updates.

/**
 * Observer that watches for image loading events and triggers layout updates
 */
class ImageLoadObserver {
  constructor(view: View);
  observe(domElement: Element, name: string): void;
  stopObserving(domElement: Element): void;
}

interface ImageLoadedEvent {
  name: 'imageLoaded';
  args: [{ imageElement: ViewElement }];
}

Usage:

// The observer is automatically used by image editing plugins
// It fires 'imageLoaded' events when images finish loading
editor.editing.view.document.on('imageLoaded', (evt, data) => {
  console.log('Image loaded:', data.imageElement);
});