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