@ckeditor/ckeditor5-ckbox 38.1.1 → 38.2.0-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
package/src/ckboxui.d.ts CHANGED
@@ -1,21 +1,21 @@
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 ckbox/ckboxui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- /**
10
- * The CKBoxUI plugin. It introduces the `'ckbox'` toolbar button.
11
- */
12
- export default class CKBoxUI extends Plugin {
13
- /**
14
- * @inheritDoc
15
- */
16
- static get pluginName(): "CKBoxUI";
17
- /**
18
- * @inheritDoc
19
- */
20
- afterInit(): void;
21
- }
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 ckbox/ckboxui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ /**
10
+ * The CKBoxUI plugin. It introduces the `'ckbox'` toolbar button.
11
+ */
12
+ export default class CKBoxUI extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "CKBoxUI";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ afterInit(): void;
21
+ }
package/src/ckboxui.js CHANGED
@@ -1,47 +1,47 @@
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 ckbox/ckboxui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { ButtonView } from 'ckeditor5/src/ui';
10
- import browseFilesIcon from '../theme/icons/browse-files.svg';
11
- /**
12
- * The CKBoxUI plugin. It introduces the `'ckbox'` toolbar button.
13
- */
14
- export default class CKBoxUI extends Plugin {
15
- /**
16
- * @inheritDoc
17
- */
18
- static get pluginName() {
19
- return 'CKBoxUI';
20
- }
21
- /**
22
- * @inheritDoc
23
- */
24
- afterInit() {
25
- const editor = this.editor;
26
- const command = editor.commands.get('ckbox');
27
- // Do not register the `ckbox` button if the command does not exist.
28
- if (!command) {
29
- return;
30
- }
31
- const t = editor.t;
32
- const componentFactory = editor.ui.componentFactory;
33
- componentFactory.add('ckbox', locale => {
34
- const button = new ButtonView(locale);
35
- button.set({
36
- label: t('Open file manager'),
37
- icon: browseFilesIcon,
38
- tooltip: true
39
- });
40
- button.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
41
- button.on('execute', () => {
42
- editor.execute('ckbox');
43
- });
44
- return button;
45
- });
46
- }
47
- }
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 ckbox/ckboxui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { ButtonView } from 'ckeditor5/src/ui.js';
10
+ import browseFilesIcon from '../theme/icons/browse-files.svg';
11
+ /**
12
+ * The CKBoxUI plugin. It introduces the `'ckbox'` toolbar button.
13
+ */
14
+ export default class CKBoxUI extends Plugin {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get pluginName() {
19
+ return 'CKBoxUI';
20
+ }
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ afterInit() {
25
+ const editor = this.editor;
26
+ const command = editor.commands.get('ckbox');
27
+ // Do not register the `ckbox` button if the command does not exist.
28
+ if (!command) {
29
+ return;
30
+ }
31
+ const t = editor.t;
32
+ const componentFactory = editor.ui.componentFactory;
33
+ componentFactory.add('ckbox', locale => {
34
+ const button = new ButtonView(locale);
35
+ button.set({
36
+ label: t('Open file manager'),
37
+ icon: browseFilesIcon,
38
+ tooltip: true
39
+ });
40
+ button.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
41
+ button.on('execute', () => {
42
+ editor.execute('ckbox');
43
+ });
44
+ return button;
45
+ });
46
+ }
47
+ }
@@ -1,38 +1,38 @@
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 ckbox/ckboxuploadadapter
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { FileRepository } from 'ckeditor5/src/upload';
10
- import CKBoxEditing from './ckboxediting';
11
- /**
12
- * A plugin that enables file uploads in CKEditor 5 using the CKBox server–side connector.
13
- * See the {@glink features/file-management/ckbox CKBox file manager integration} guide to learn how to configure
14
- * and use this feature as well as find out more about the full integration with the file manager
15
- * provided by the {@link module:ckbox/ckbox~CKBox} plugin.
16
- *
17
- * Check out the {@glink features/images/image-upload/image-upload Image upload overview} guide to learn about
18
- * other ways to upload images into CKEditor 5.
19
- */
20
- export default class CKBoxUploadAdapter extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get requires(): readonly ["ImageUploadEditing", "ImageUploadProgress", typeof FileRepository, typeof CKBoxEditing];
25
- /**
26
- * @inheritDoc
27
- */
28
- static get pluginName(): "CKBoxUploadAdapter";
29
- /**
30
- * @inheritDoc
31
- */
32
- afterInit(): Promise<void>;
33
- }
34
- export interface AvailableCategory {
35
- id: string;
36
- name: string;
37
- extensions: Array<string>;
38
- }
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 ckbox/ckboxuploadadapter
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core.js';
9
+ import { FileRepository } from 'ckeditor5/src/upload.js';
10
+ import CKBoxEditing from './ckboxediting.js';
11
+ /**
12
+ * A plugin that enables file uploads in CKEditor 5 using the CKBox server–side connector.
13
+ * See the {@glink features/file-management/ckbox CKBox file manager integration} guide to learn how to configure
14
+ * and use this feature as well as find out more about the full integration with the file manager
15
+ * provided by the {@link module:ckbox/ckbox~CKBox} plugin.
16
+ *
17
+ * Check out the {@glink features/images/image-upload/image-upload Image upload overview} guide to learn about
18
+ * other ways to upload images into CKEditor 5.
19
+ */
20
+ export default class CKBoxUploadAdapter extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get requires(): readonly ["ImageUploadEditing", "ImageUploadProgress", typeof FileRepository, typeof CKBoxEditing];
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get pluginName(): "CKBoxUploadAdapter";
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ afterInit(): Promise<void>;
33
+ }
34
+ export interface AvailableCategory {
35
+ id: string;
36
+ name: string;
37
+ extensions: Array<string>;
38
+ }