UNPKG

996 BTypeScriptView Raw
1/**
2 * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4 */
5/**
6 * @module image/imagetextalternative/imagetextalternativecommand
7 */
8import { Command } from 'ckeditor5/src/core';
9/**
10 * The image text alternative command. It is used to change the `alt` attribute of `<imageBlock>` and `<imageInline>` model elements.
11 */
12export default class ImageTextAlternativeCommand extends Command {
13 /**
14 * The command value: `false` if there is no `alt` attribute, otherwise the value of the `alt` attribute.
15 *
16 * @readonly
17 * @observable
18 */
19 value: string | false;
20 /**
21 * @inheritDoc
22 */
23 refresh(): void;
24 /**
25 * Executes the command.
26 *
27 * @fires execute
28 * @param options
29 * @param options.newValue The new value of the `alt` attribute to set.
30 */
31 execute(options: {
32 newValue: string;
33 }): void;
34}