UNPKG

1.35 kBTypeScriptView Raw
1/**
2 * @license Copyright (c) 2003-2024, 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/**
6 * @module heading/headingediting
7 */
8import { Plugin, type Editor } from 'ckeditor5/src/core.js';
9import { Paragraph } from 'ckeditor5/src/paragraph.js';
10/**
11 * The headings engine feature. It handles switching between block formats – headings and paragraph.
12 * This class represents the engine part of the heading feature. See also {@link module:heading/heading~Heading}.
13 * It introduces `heading1`-`headingN` commands which allow to convert paragraphs into headings.
14 */
15export default class HeadingEditing extends Plugin {
16 /**
17 * @inheritDoc
18 */
19 static get pluginName(): "HeadingEditing";
20 /**
21 * @inheritDoc
22 */
23 static get isOfficialPlugin(): true;
24 /**
25 * @inheritDoc
26 */
27 constructor(editor: Editor);
28 /**
29 * @inheritDoc
30 */
31 static get requires(): readonly [typeof Paragraph];
32 /**
33 * @inheritDoc
34 */
35 init(): void;
36 /**
37 * @inheritDoc
38 */
39 afterInit(): void;
40 /**
41 * Adds default conversion for `h1` -> `heading1` with a low priority.
42 *
43 * @param editor Editor instance on which to add the `h1` conversion.
44 */
45 private _addDefaultH1Conversion;
46}