Typedef

CKBoxAssetImageAttributesDefinition (ckbox)

@ckeditor/ckeditor5-ckbox/src/ckbox

typedef
Object

Asset attributes definition for an image.

The definition contains the imageFallbackUrl, an imageSources array with one image source definition object and the imageTextAlternative.

{
	imageFallbackUrl: 'https://example.com/assets/asset-id/images/1000.png',
	imageSources: [
		{
			sizes: '1000px',
			srcset:
				'https://example.com/assets/asset-id/images/100.webp 100w,' +
				'https://example.com/assets/asset-id/images/200.webp 200w,' +
				'https://example.com/assets/asset-id/images/300.webp 300w,' +
				'https://example.com/assets/asset-id/images/400.webp 400w,' +
				'https://example.com/assets/asset-id/images/500.webp 500w,' +
				'https://example.com/assets/asset-id/images/600.webp 600w,' +
				'https://example.com/assets/asset-id/images/700.webp 700w,' +
				'https://example.com/assets/asset-id/images/800.webp 800w,' +
				'https://example.com/assets/asset-id/images/900.webp 900w,' +
				'https://example.com/assets/asset-id/images/1000.webp 1000w',
			type: 'image/webp'
		}
	],
	imageTextAlternative: 'An alternative text for the image'
}

Filtering

Properties

  • imageFallbackUrl : String

    A fallback URL for browsers that do not support the "webp" format.

  • imageSources : Array.<Object>

    An array containing one image source definition object.

  • imageTextAlternative : String

    An alternative text for an image.