UNPKG

1.09 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 paragraph/paragraphbuttonui
7 */
8import { Plugin } from '@ckeditor/ckeditor5-core';
9import Paragraph from './paragraph.js';
10/**
11 * This plugin defines the `'paragraph'` button. It can be used together with
12 * {@link module:heading/headingbuttonsui~HeadingButtonsUI} to replace the standard heading dropdown.
13 *
14 * This plugin is not loaded automatically by the {@link module:paragraph/paragraph~Paragraph} plugin. It must
15 * be added manually.
16 *
17 * ```ts
18 * ClassicEditor
19 * .create( {
20 * plugins: [ ..., Heading, Paragraph, HeadingButtonsUI, ParagraphButtonUI ]
21 * toolbar: [ 'paragraph', 'heading1', 'heading2', 'heading3' ]
22 * } )
23 * .then( ... )
24 * .catch( ... );
25 * ```
26 */
27export default class ParagraphButtonUI extends Plugin {
28 /**
29 * @inheritDoc
30 */
31 static get requires(): readonly [typeof Paragraph];
32 /**
33 * @inheritDoc
34 */
35 init(): void;
36}