@ckeditor/ckeditor5-remove-format 39.0.1 → 40.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +3 -3
- package/build/remove-format.js.map +1 -0
- package/lang/translations/af.po +1 -0
- package/lang/translations/ar.po +1 -0
- package/lang/translations/az.po +1 -0
- package/lang/translations/bg.po +1 -0
- package/lang/translations/bn.po +1 -0
- package/lang/translations/ca.po +1 -0
- package/lang/translations/cs.po +1 -0
- package/lang/translations/da.po +1 -0
- package/lang/translations/de-ch.po +1 -0
- package/lang/translations/de.po +1 -0
- package/lang/translations/el.po +1 -0
- package/lang/translations/en-au.po +1 -0
- package/lang/translations/en-gb.po +1 -0
- package/lang/translations/en.po +1 -0
- package/lang/translations/es.po +1 -0
- package/lang/translations/et.po +1 -0
- package/lang/translations/fa.po +1 -0
- package/lang/translations/fi.po +1 -0
- package/lang/translations/fr.po +1 -0
- package/lang/translations/gl.po +1 -0
- package/lang/translations/he.po +1 -0
- package/lang/translations/hi.po +1 -0
- package/lang/translations/hr.po +1 -0
- package/lang/translations/hu.po +1 -0
- package/lang/translations/id.po +1 -0
- package/lang/translations/it.po +1 -0
- package/lang/translations/ja.po +1 -0
- package/lang/translations/ko.po +1 -0
- package/lang/translations/ku.po +1 -0
- package/lang/translations/lt.po +1 -0
- package/lang/translations/lv.po +1 -0
- package/lang/translations/ms.po +1 -0
- package/lang/translations/ne.po +1 -0
- package/lang/translations/nl.po +1 -0
- package/lang/translations/no.po +1 -0
- package/lang/translations/pl.po +1 -0
- package/lang/translations/pt-br.po +1 -0
- package/lang/translations/pt.po +1 -0
- package/lang/translations/ro.po +1 -0
- package/lang/translations/ru.po +1 -0
- package/lang/translations/sk.po +1 -0
- package/lang/translations/sq.po +1 -0
- package/lang/translations/sr-latn.po +1 -0
- package/lang/translations/sr.po +1 -0
- package/lang/translations/sv.po +1 -0
- package/lang/translations/th.po +1 -0
- package/lang/translations/tk.po +1 -0
- package/lang/translations/tr.po +1 -0
- package/lang/translations/ug.po +1 -0
- package/lang/translations/uk.po +1 -0
- package/lang/translations/ur.po +1 -0
- package/lang/translations/uz.po +1 -0
- package/lang/translations/vi.po +1 -0
- package/lang/translations/zh-cn.po +1 -0
- package/lang/translations/zh.po +1 -0
- package/package.json +2 -6
- package/src/augmentation.d.ts +15 -15
- package/src/augmentation.js +5 -5
- package/src/index.d.ts +12 -12
- package/src/index.js +11 -11
- package/src/removeformat.d.ts +28 -28
- package/src/removeformat.js +32 -32
- package/src/removeformatcommand.d.ts +42 -42
- package/src/removeformatcommand.js +94 -94
- package/src/removeformatediting.d.ts +23 -23
- package/src/removeformatediting.js +29 -29
- package/src/removeformatui.d.ts +22 -22
- package/src/removeformatui.js +46 -46
package/src/removeformatui.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, 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 remove-format/removeformatui
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { ButtonView } from 'ckeditor5/src/ui';
|
|
10
|
-
import removeFormatIcon from '../theme/icons/remove-format.svg';
|
|
11
|
-
const REMOVE_FORMAT = 'removeFormat';
|
|
12
|
-
/**
|
|
13
|
-
* The remove format UI plugin. It registers the `'removeFormat'` button which can be
|
|
14
|
-
* used in the toolbar.
|
|
15
|
-
*/
|
|
16
|
-
export default class RemoveFormatUI extends Plugin {
|
|
17
|
-
/**
|
|
18
|
-
* @inheritDoc
|
|
19
|
-
*/
|
|
20
|
-
static get pluginName() {
|
|
21
|
-
return 'RemoveFormatUI';
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @inheritDoc
|
|
25
|
-
*/
|
|
26
|
-
init() {
|
|
27
|
-
const editor = this.editor;
|
|
28
|
-
const t = editor.t;
|
|
29
|
-
editor.ui.componentFactory.add(REMOVE_FORMAT, locale => {
|
|
30
|
-
const command = editor.commands.get(REMOVE_FORMAT);
|
|
31
|
-
const view = new ButtonView(locale);
|
|
32
|
-
view.set({
|
|
33
|
-
label: t('Remove Format'),
|
|
34
|
-
icon: removeFormatIcon,
|
|
35
|
-
tooltip: true
|
|
36
|
-
});
|
|
37
|
-
view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
|
|
38
|
-
// Execute the command.
|
|
39
|
-
this.listenTo(view, 'execute', () => {
|
|
40
|
-
editor.execute(REMOVE_FORMAT);
|
|
41
|
-
editor.editing.view.focus();
|
|
42
|
-
});
|
|
43
|
-
return view;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, 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 remove-format/removeformatui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
+
import { ButtonView } from 'ckeditor5/src/ui';
|
|
10
|
+
import removeFormatIcon from '../theme/icons/remove-format.svg';
|
|
11
|
+
const REMOVE_FORMAT = 'removeFormat';
|
|
12
|
+
/**
|
|
13
|
+
* The remove format UI plugin. It registers the `'removeFormat'` button which can be
|
|
14
|
+
* used in the toolbar.
|
|
15
|
+
*/
|
|
16
|
+
export default class RemoveFormatUI extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName() {
|
|
21
|
+
return 'RemoveFormatUI';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
init() {
|
|
27
|
+
const editor = this.editor;
|
|
28
|
+
const t = editor.t;
|
|
29
|
+
editor.ui.componentFactory.add(REMOVE_FORMAT, locale => {
|
|
30
|
+
const command = editor.commands.get(REMOVE_FORMAT);
|
|
31
|
+
const view = new ButtonView(locale);
|
|
32
|
+
view.set({
|
|
33
|
+
label: t('Remove Format'),
|
|
34
|
+
icon: removeFormatIcon,
|
|
35
|
+
tooltip: true
|
|
36
|
+
});
|
|
37
|
+
view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
|
|
38
|
+
// Execute the command.
|
|
39
|
+
this.listenTo(view, 'execute', () => {
|
|
40
|
+
editor.execute(REMOVE_FORMAT);
|
|
41
|
+
editor.editing.view.focus();
|
|
42
|
+
});
|
|
43
|
+
return view;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|