UNPKG

1.28 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 constructor(editor: Editor);
24 /**
25 * @inheritDoc
26 */
27 static get requires(): readonly [typeof Paragraph];
28 /**
29 * @inheritDoc
30 */
31 init(): void;
32 /**
33 * @inheritDoc
34 */
35 afterInit(): void;
36 /**
37 * Adds default conversion for `h1` -> `heading1` with a low priority.
38 *
39 * @param editor Editor instance on which to add the `h1` conversion.
40 */
41 private _addDefaultH1Conversion;
42}