-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
fontbackgroundcolorui.ts
40 lines (34 loc) · 1020 Bytes
/
fontbackgroundcolorui.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* @module font/fontbackgroundcolor/fontbackgroundcolorui
*/
import ColorUI from '../ui/colorui.js';
import { FONT_BACKGROUND_COLOR } from '../utils.js';
import type { Editor } from 'ckeditor5/src/core.js';
import fontBackgroundColorIcon from '../../theme/icons/font-background.svg';
/**
* The font background color UI plugin. It introduces the `'fontBackgroundColor'` dropdown.
*/
export default class FontBackgroundColorUI extends ColorUI {
/**
* @inheritDoc
*/
constructor( editor: Editor ) {
const t = editor.locale.t;
super( editor, {
commandName: FONT_BACKGROUND_COLOR,
componentName: FONT_BACKGROUND_COLOR,
icon: fontBackgroundColorIcon,
dropdownLabel: t( 'Font Background Color' )
} );
}
/**
* @inheritDoc
*/
public static get pluginName() {
return 'FontBackgroundColorUI' as const;
}
}