UNPKG

1.04 kBTypeScriptView Raw
1/**
2 * @license Copyright (c) 2003-2024, 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 link/unlinkcommand
7 */
8import { Command } from 'ckeditor5/src/core.js';
9/**
10 * The unlink command. It is used by the {@link module:link/link~Link link plugin}.
11 */
12export default class UnlinkCommand extends Command {
13 /**
14 * @inheritDoc
15 */
16 refresh(): void;
17 /**
18 * Executes the command.
19 *
20 * When the selection is collapsed, it removes the `linkHref` attribute from each node with the same `linkHref` attribute value.
21 * When the selection is non-collapsed, it removes the `linkHref` attribute from each node in selected ranges.
22 *
23 * # Decorators
24 *
25 * If {@link module:link/linkconfig~LinkConfig#decorators `config.link.decorators`} is specified,
26 * all configured decorators are removed together with the `linkHref` attribute.
27 *
28 * @fires execute
29 */
30 execute(): void;
31}