1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { Command, type Editor } from 'ckeditor5/src/core';
|
9 | import type { Element } from 'ckeditor5/src/engine';
|
10 |
|
11 |
|
12 |
|
13 | export default class DocumentListIndentCommand extends Command {
|
14 | |
15 |
|
16 |
|
17 | private readonly _direction;
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | constructor(editor: Editor, indentDirection: 'forward' | 'backward');
|
26 | /**
|
27 | * @inheritDoc
|
28 | */
|
29 | refresh(): void;
|
30 | /**
|
31 | * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.
|
32 | *
|
33 | * @fires execute
|
34 | * @fires afterExecute
|
35 | */
|
36 | execute(): void;
|
37 | /**
|
38 | * Fires the `afterExecute` event.
|
39 | *
|
40 | * @param changedBlocks The changed list elements.
|
41 | */
|
42 | private _fireAfterExecute;
|
43 | /**
|
44 | * Checks whether the command can be enabled in the current context.
|
45 | *
|
46 | * @returns Whether the command should be enabled.
|
47 | */
|
48 | private _checkEnabled;
|
49 | }
|
50 | /**
|
51 | * Event fired by the {@link ~DocumentListIndentCommand#execute} method.
|
52 | *
|
53 | * It allows to execute an action after executing the {@link module:list/documentlist/documentlistcommand~DocumentListCommand#execute}
|
54 | * method, for example adjusting attributes of changed list items.
|
55 | *
|
56 | * @internal
|
57 | * @eventName ~DocumentListIndentCommand#afterExecute
|
58 | */
|
59 | export type DocumentListIndentCommandAfterExecuteEvent = {
|
60 | name: 'afterExecute';
|
61 | args: [changedBlocks: Array<Element>];
|
62 | };
|