@ckeditor/ckeditor5-indent 39.0.2 → 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/src/indentui.d.ts CHANGED
@@ -1,27 +1,27 @@
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
- import { Plugin } from 'ckeditor5/src/core';
6
- /**
7
- * The indent UI feature.
8
- *
9
- * This plugin registers the `'indent'` and `'outdent'` buttons.
10
- *
11
- * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in
12
- * the {@link module:indent/indent~Indent indent feature} API documentation.
13
- */
14
- export default class IndentUI extends Plugin {
15
- /**
16
- * @inheritDoc
17
- */
18
- static get pluginName(): "IndentUI";
19
- /**
20
- * @inheritDoc
21
- */
22
- init(): void;
23
- /**
24
- * Defines a UI button.
25
- */
26
- private _defineButton;
27
- }
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
+ import { Plugin } from 'ckeditor5/src/core';
6
+ /**
7
+ * The indent UI feature.
8
+ *
9
+ * This plugin registers the `'indent'` and `'outdent'` buttons.
10
+ *
11
+ * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in
12
+ * the {@link module:indent/indent~Indent indent feature} API documentation.
13
+ */
14
+ export default class IndentUI extends Plugin {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get pluginName(): "IndentUI";
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ init(): void;
23
+ /**
24
+ * Defines a UI button.
25
+ */
26
+ private _defineButton;
27
+ }
package/src/indentui.js CHANGED
@@ -1,60 +1,60 @@
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 indent/indentui
7
- */
8
- import { ButtonView } from 'ckeditor5/src/ui';
9
- import { Plugin } from 'ckeditor5/src/core';
10
- import indentIcon from '../theme/icons/indent.svg';
11
- import outdentIcon from '../theme/icons/outdent.svg';
12
- /**
13
- * The indent UI feature.
14
- *
15
- * This plugin registers the `'indent'` and `'outdent'` buttons.
16
- *
17
- * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in
18
- * the {@link module:indent/indent~Indent indent feature} API documentation.
19
- */
20
- export default class IndentUI extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName() {
25
- return 'IndentUI';
26
- }
27
- /**
28
- * @inheritDoc
29
- */
30
- init() {
31
- const editor = this.editor;
32
- const locale = editor.locale;
33
- const t = editor.t;
34
- const localizedIndentIcon = locale.uiLanguageDirection == 'ltr' ? indentIcon : outdentIcon;
35
- const localizedOutdentIcon = locale.uiLanguageDirection == 'ltr' ? outdentIcon : indentIcon;
36
- this._defineButton('indent', t('Increase indent'), localizedIndentIcon);
37
- this._defineButton('outdent', t('Decrease indent'), localizedOutdentIcon);
38
- }
39
- /**
40
- * Defines a UI button.
41
- */
42
- _defineButton(commandName, label, icon) {
43
- const editor = this.editor;
44
- editor.ui.componentFactory.add(commandName, locale => {
45
- const command = editor.commands.get(commandName);
46
- const view = new ButtonView(locale);
47
- view.set({
48
- label,
49
- icon,
50
- tooltip: true
51
- });
52
- view.bind('isEnabled').to(command, 'isEnabled');
53
- this.listenTo(view, 'execute', () => {
54
- editor.execute(commandName);
55
- editor.editing.view.focus();
56
- });
57
- return view;
58
- });
59
- }
60
- }
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 indent/indentui
7
+ */
8
+ import { ButtonView } from 'ckeditor5/src/ui';
9
+ import { Plugin } from 'ckeditor5/src/core';
10
+ import indentIcon from '../theme/icons/indent.svg';
11
+ import outdentIcon from '../theme/icons/outdent.svg';
12
+ /**
13
+ * The indent UI feature.
14
+ *
15
+ * This plugin registers the `'indent'` and `'outdent'` buttons.
16
+ *
17
+ * **Note**: In order for the commands to work, at least one of the compatible features is required. Read more in
18
+ * the {@link module:indent/indent~Indent indent feature} API documentation.
19
+ */
20
+ export default class IndentUI extends Plugin {
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName() {
25
+ return 'IndentUI';
26
+ }
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ init() {
31
+ const editor = this.editor;
32
+ const locale = editor.locale;
33
+ const t = editor.t;
34
+ const localizedIndentIcon = locale.uiLanguageDirection == 'ltr' ? indentIcon : outdentIcon;
35
+ const localizedOutdentIcon = locale.uiLanguageDirection == 'ltr' ? outdentIcon : indentIcon;
36
+ this._defineButton('indent', t('Increase indent'), localizedIndentIcon);
37
+ this._defineButton('outdent', t('Decrease indent'), localizedOutdentIcon);
38
+ }
39
+ /**
40
+ * Defines a UI button.
41
+ */
42
+ _defineButton(commandName, label, icon) {
43
+ const editor = this.editor;
44
+ editor.ui.componentFactory.add(commandName, locale => {
45
+ const command = editor.commands.get(commandName);
46
+ const view = new ButtonView(locale);
47
+ view.set({
48
+ label,
49
+ icon,
50
+ tooltip: true
51
+ });
52
+ view.bind('isEnabled').to(command, 'isEnabled');
53
+ this.listenTo(view, 'execute', () => {
54
+ editor.execute(commandName);
55
+ editor.editing.view.focus();
56
+ });
57
+ return view;
58
+ });
59
+ }
60
+ }
package/src/index.d.ts CHANGED
@@ -1,14 +1,14 @@
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 indent
7
- */
8
- export { default as Indent } from './indent';
9
- export { default as IndentEditing } from './indentediting';
10
- export { default as IndentUI } from './indentui';
11
- export { default as IndentBlock } from './indentblock';
12
- export type { IndentBlockConfig } from './indentconfig';
13
- export type { default as IndentBlockCommand } from './indentblockcommand';
14
- import './augmentation';
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 indent
7
+ */
8
+ export { default as Indent } from './indent';
9
+ export { default as IndentEditing } from './indentediting';
10
+ export { default as IndentUI } from './indentui';
11
+ export { default as IndentBlock } from './indentblock';
12
+ export type { IndentBlockConfig } from './indentconfig';
13
+ export type { default as IndentBlockCommand } from './indentblockcommand';
14
+ import './augmentation';
package/src/index.js CHANGED
@@ -1,12 +1,12 @@
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 indent
7
- */
8
- export { default as Indent } from './indent';
9
- export { default as IndentEditing } from './indentediting';
10
- export { default as IndentUI } from './indentui';
11
- export { default as IndentBlock } from './indentblock';
12
- import './augmentation';
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 indent
7
+ */
8
+ export { default as Indent } from './indent';
9
+ export { default as IndentEditing } from './indentediting';
10
+ export { default as IndentUI } from './indentui';
11
+ export { default as IndentBlock } from './indentblock';
12
+ import './augmentation';