1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { Command, type Editor } from '@ckeditor/ckeditor5-core';
|
9 | import type { Selection, DocumentSelection } from '@ckeditor/ckeditor5-engine';
|
10 |
|
11 |
|
12 |
|
13 | export default class ParagraphCommand extends Command {
|
14 | constructor(editor: Editor);
|
15 | /**
|
16 | * The value of the command. Indicates whether the selection start is placed in a paragraph.
|
17 | *
|
18 | * @readonly
|
19 | * @observable
|
20 | */
|
21 | value: boolean;
|
22 | /**
|
23 | * @inheritDoc
|
24 | */
|
25 | refresh(): void;
|
26 | /**
|
27 | * Executes the command. All the blocks (see {@link module:engine/model/schema~Schema}) in the selection
|
28 | * will be turned to paragraphs.
|
29 | *
|
30 | * @fires execute
|
31 | * @param options Options for the executed command.
|
32 | * @param options.selection The selection that the command should be applied to. By default,
|
33 | * if not provided, the command is applied to the {@link module:engine/model/document~Document#selection}.
|
34 | */
|
35 | execute(options?: {
|
36 | selection?: Selection | DocumentSelection;
|
37 | }): void;
|
38 | }
|