1 |
|
2 |
|
3 |
|
4 |
|
5 | import { Command, type Editor } from 'ckeditor5/src/core.js';
|
6 | import { type ListType } from '../list/listediting.js';
|
7 |
|
8 |
|
9 |
|
10 | export default class LegacyListCommand extends Command {
|
11 | |
12 |
|
13 |
|
14 | readonly type: ListType;
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 | value: boolean;
|
21 | |
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | constructor(editor: Editor, type: ListType);
|
28 | /**
|
29 | * @inheritDoc
|
30 | */
|
31 | refresh(): void;
|
32 | /**
|
33 | * Executes the list command.
|
34 | *
|
35 | * @fires execute
|
36 | * @param options Command options.
|
37 | * @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the
|
38 | * selected items and potentially the neighbor elements to the proper list items. If set to `false`, it will convert selected elements
|
39 | * to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.
|
40 | */
|
41 | execute(options?: {
|
42 | forceValue?: boolean;
|
43 | }): void;
|
44 | /**
|
45 | * Checks the command's {@link #value}.
|
46 | *
|
47 | * @returns The current value.
|
48 | */
|
49 | private _getValue;
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 | private _checkEnabled;
|
56 | }
|