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 | import { Command, type Editor } from 'ckeditor5/src/core';
|
6 | /**
|
7 | * The list indent command. It is used by the {@link module:list/list~List list feature}.
|
8 | */
|
9 | export default class IndentCommand extends Command {
|
10 | /**
|
11 | * Determines by how much the command will change the list item's indent attribute.
|
12 | */
|
13 | private readonly _indentBy;
|
14 | /**
|
15 | * Creates an instance of the command.
|
16 | *
|
17 | * @param editor The editor instance.
|
18 | * @param indentDirection The direction of indent. If it is equal to `backward`, the command will outdent a list item.
|
19 | */
|
20 | constructor(editor: Editor, indentDirection: 'forward' | 'backward');
|
21 | /**
|
22 | * @inheritDoc
|
23 | */
|
24 | refresh(): void;
|
25 | /**
|
26 | * Indents or outdents (depending on the {) selected list items.
#constructor}'s `indentDirection` parameter |
27 | *
|
28 | * @fires execute
|
29 | */
|
30 | execute(): void;
|
31 | /**
|
32 | * Checks whether the command can be enabled in the current context.
|
33 | *
|
34 | * @returns Whether the command should be enabled.
|
35 | */
|
36 | private _checkEnabled;
|
37 | }
|