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 list/list/listui
|
7 | */
|
8 | import { createUIComponent } from './utils.js';
|
9 | import { icons, Plugin } from 'ckeditor5/src/core.js';
|
10 | /**
|
11 | * The list UI feature. It introduces the `'numberedList'` and `'bulletedList'` buttons that
|
12 | * allow to convert paragraphs to and from list items and indent or outdent them.
|
13 | */
|
14 | export default class ListUI extends Plugin {
|
15 | /**
|
16 | * @inheritDoc
|
17 | */
|
18 | static get pluginName() {
|
19 | return 'ListUI';
|
20 | }
|
21 | /**
|
22 | * @inheritDoc
|
23 | */
|
24 | init() {
|
25 | const t = this.editor.t;
|
26 | // Create two buttons and link them with numberedList and bulletedList commands.
|
27 | createUIComponent(this.editor, 'numberedList', t('Numbered List'), icons.numberedList);
|
28 | createUIComponent(this.editor, 'bulletedList', t('Bulleted List'), icons.bulletedList);
|
29 | }
|
30 | }
|