@ckeditor/ckeditor5-basic-styles 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.
Files changed (124) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/LICENSE.md +1 -1
  3. package/README.md +3 -3
  4. package/build/basic-styles.js.map +1 -0
  5. package/build/translations/hy.js +1 -0
  6. package/lang/translations/af.po +1 -0
  7. package/lang/translations/ar.po +1 -0
  8. package/lang/translations/ast.po +1 -0
  9. package/lang/translations/az.po +1 -0
  10. package/lang/translations/bg.po +1 -0
  11. package/lang/translations/bn.po +1 -0
  12. package/lang/translations/bs.po +1 -0
  13. package/lang/translations/ca.po +1 -0
  14. package/lang/translations/cs.po +1 -0
  15. package/lang/translations/da.po +1 -0
  16. package/lang/translations/de-ch.po +1 -0
  17. package/lang/translations/de.po +1 -0
  18. package/lang/translations/el.po +1 -0
  19. package/lang/translations/en-au.po +1 -0
  20. package/lang/translations/en-gb.po +1 -0
  21. package/lang/translations/en.po +1 -0
  22. package/lang/translations/eo.po +1 -0
  23. package/lang/translations/es-co.po +1 -0
  24. package/lang/translations/es.po +1 -0
  25. package/lang/translations/et.po +1 -0
  26. package/lang/translations/eu.po +1 -0
  27. package/lang/translations/fa.po +1 -0
  28. package/lang/translations/fi.po +1 -0
  29. package/lang/translations/fr.po +1 -0
  30. package/lang/translations/gl.po +1 -0
  31. package/lang/translations/gu.po +1 -0
  32. package/lang/translations/he.po +1 -0
  33. package/lang/translations/hi.po +1 -0
  34. package/lang/translations/hr.po +1 -0
  35. package/lang/translations/hu.po +1 -0
  36. package/lang/translations/hy.po +46 -0
  37. package/lang/translations/id.po +1 -0
  38. package/lang/translations/it.po +1 -0
  39. package/lang/translations/ja.po +1 -0
  40. package/lang/translations/jv.po +1 -0
  41. package/lang/translations/km.po +1 -0
  42. package/lang/translations/kn.po +1 -0
  43. package/lang/translations/ko.po +1 -0
  44. package/lang/translations/ku.po +1 -0
  45. package/lang/translations/lt.po +1 -0
  46. package/lang/translations/lv.po +1 -0
  47. package/lang/translations/ms.po +1 -0
  48. package/lang/translations/nb.po +1 -0
  49. package/lang/translations/ne.po +1 -0
  50. package/lang/translations/nl.po +1 -0
  51. package/lang/translations/no.po +1 -0
  52. package/lang/translations/oc.po +1 -0
  53. package/lang/translations/pl.po +1 -0
  54. package/lang/translations/pt-br.po +1 -0
  55. package/lang/translations/pt.po +1 -0
  56. package/lang/translations/ro.po +1 -0
  57. package/lang/translations/ru.po +1 -0
  58. package/lang/translations/si.po +1 -0
  59. package/lang/translations/sk.po +1 -0
  60. package/lang/translations/sl.po +1 -0
  61. package/lang/translations/sq.po +1 -0
  62. package/lang/translations/sr-latn.po +1 -0
  63. package/lang/translations/sr.po +1 -0
  64. package/lang/translations/sv.po +1 -0
  65. package/lang/translations/th.po +1 -0
  66. package/lang/translations/tk.po +1 -0
  67. package/lang/translations/tr.po +1 -0
  68. package/lang/translations/tt.po +1 -0
  69. package/lang/translations/ug.po +1 -0
  70. package/lang/translations/uk.po +1 -0
  71. package/lang/translations/ur.po +1 -0
  72. package/lang/translations/uz.po +1 -0
  73. package/lang/translations/vi.po +1 -0
  74. package/lang/translations/zh-cn.po +1 -0
  75. package/lang/translations/zh.po +1 -0
  76. package/package.json +2 -6
  77. package/src/attributecommand.d.ts +74 -74
  78. package/src/attributecommand.js +105 -105
  79. package/src/augmentation.d.ts +40 -40
  80. package/src/augmentation.js +5 -5
  81. package/src/bold/boldediting.d.ts +24 -24
  82. package/src/bold/boldediting.js +62 -62
  83. package/src/bold/boldui.d.ts +21 -21
  84. package/src/bold/boldui.js +47 -47
  85. package/src/bold.d.ts +29 -29
  86. package/src/bold.js +33 -33
  87. package/src/code/codeediting.d.ts +29 -29
  88. package/src/code/codeediting.js +59 -59
  89. package/src/code/codeui.d.ts +22 -22
  90. package/src/code/codeui.js +48 -48
  91. package/src/code.d.ts +30 -30
  92. package/src/code.js +34 -34
  93. package/src/index.d.ts +30 -30
  94. package/src/index.js +29 -29
  95. package/src/italic/italicediting.d.ts +24 -24
  96. package/src/italic/italicediting.js +52 -52
  97. package/src/italic/italicui.d.ts +21 -21
  98. package/src/italic/italicui.js +48 -48
  99. package/src/italic.d.ts +29 -29
  100. package/src/italic.js +33 -33
  101. package/src/strikethrough/strikethroughediting.d.ts +25 -25
  102. package/src/strikethrough/strikethroughediting.js +54 -54
  103. package/src/strikethrough/strikethroughui.d.ts +21 -21
  104. package/src/strikethrough/strikethroughui.js +48 -48
  105. package/src/strikethrough.d.ts +29 -29
  106. package/src/strikethrough.js +33 -33
  107. package/src/subscript/subscriptediting.d.ts +24 -24
  108. package/src/subscript/subscriptediting.js +50 -50
  109. package/src/subscript/subscriptui.d.ts +21 -21
  110. package/src/subscript/subscriptui.js +47 -47
  111. package/src/subscript.d.ts +26 -26
  112. package/src/subscript.js +30 -30
  113. package/src/superscript/superscriptediting.d.ts +24 -24
  114. package/src/superscript/superscriptediting.js +50 -50
  115. package/src/superscript/superscriptui.d.ts +21 -21
  116. package/src/superscript/superscriptui.js +47 -47
  117. package/src/superscript.d.ts +26 -26
  118. package/src/superscript.js +30 -30
  119. package/src/underline/underlineediting.d.ts +24 -24
  120. package/src/underline/underlineediting.js +49 -49
  121. package/src/underline/underlineui.d.ts +21 -21
  122. package/src/underline/underlineui.js +48 -48
  123. package/src/underline.d.ts +29 -29
  124. package/src/underline.js +33 -33
package/src/subscript.js CHANGED
@@ -1,30 +1,30 @@
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 basic-styles/subscript
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import SubscriptEditing from './subscript/subscriptediting';
10
- import SubscriptUI from './subscript/subscriptui';
11
- /**
12
- * The subscript feature.
13
- *
14
- * It loads the {@link module:basic-styles/subscript/subscriptediting~SubscriptEditing} and
15
- * {@link module:basic-styles/subscript/subscriptui~SubscriptUI} plugins.
16
- */
17
- export default class Subscript extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get requires() {
22
- return [SubscriptEditing, SubscriptUI];
23
- }
24
- /**
25
- * @inheritDoc
26
- */
27
- static get pluginName() {
28
- return 'Subscript';
29
- }
30
- }
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 basic-styles/subscript
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import SubscriptEditing from './subscript/subscriptediting';
10
+ import SubscriptUI from './subscript/subscriptui';
11
+ /**
12
+ * The subscript feature.
13
+ *
14
+ * It loads the {@link module:basic-styles/subscript/subscriptediting~SubscriptEditing} and
15
+ * {@link module:basic-styles/subscript/subscriptui~SubscriptUI} plugins.
16
+ */
17
+ export default class Subscript extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires() {
22
+ return [SubscriptEditing, SubscriptUI];
23
+ }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName() {
28
+ return 'Subscript';
29
+ }
30
+ }
@@ -1,24 +1,24 @@
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 basic-styles/superscript/superscriptediting
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- /**
10
- * The superscript editing feature.
11
- *
12
- * It registers the `super` command and introduces the `super` attribute in the model which renders to the view
13
- * as a `<super>` element.
14
- */
15
- export default class SuperscriptEditing extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "SuperscriptEditing";
20
- /**
21
- * @inheritDoc
22
- */
23
- init(): void;
24
- }
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 basic-styles/superscript/superscriptediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ /**
10
+ * The superscript editing feature.
11
+ *
12
+ * It registers the `super` command and introduces the `super` attribute in the model which renders to the view
13
+ * as a `<super>` element.
14
+ */
15
+ export default class SuperscriptEditing extends Plugin {
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "SuperscriptEditing";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ init(): void;
24
+ }
@@ -1,50 +1,50 @@
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 basic-styles/superscript/superscriptediting
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import AttributeCommand from '../attributecommand';
10
- const SUPERSCRIPT = 'superscript';
11
- /**
12
- * The superscript editing feature.
13
- *
14
- * It registers the `super` command and introduces the `super` attribute in the model which renders to the view
15
- * as a `<super>` element.
16
- */
17
- export default class SuperscriptEditing extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get pluginName() {
22
- return 'SuperscriptEditing';
23
- }
24
- /**
25
- * @inheritDoc
26
- */
27
- init() {
28
- const editor = this.editor;
29
- // Allow super attribute on text nodes.
30
- editor.model.schema.extend('$text', { allowAttributes: SUPERSCRIPT });
31
- editor.model.schema.setAttributeProperties(SUPERSCRIPT, {
32
- isFormatting: true,
33
- copyOnEnter: true
34
- });
35
- // Build converter from model to view for data and editing pipelines.
36
- editor.conversion.attributeToElement({
37
- model: SUPERSCRIPT,
38
- view: 'sup',
39
- upcastAlso: [
40
- {
41
- styles: {
42
- 'vertical-align': 'super'
43
- }
44
- }
45
- ]
46
- });
47
- // Create super command.
48
- editor.commands.add(SUPERSCRIPT, new AttributeCommand(editor, SUPERSCRIPT));
49
- }
50
- }
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 basic-styles/superscript/superscriptediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import AttributeCommand from '../attributecommand';
10
+ const SUPERSCRIPT = 'superscript';
11
+ /**
12
+ * The superscript editing feature.
13
+ *
14
+ * It registers the `super` command and introduces the `super` attribute in the model which renders to the view
15
+ * as a `<super>` element.
16
+ */
17
+ export default class SuperscriptEditing extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName() {
22
+ return 'SuperscriptEditing';
23
+ }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ init() {
28
+ const editor = this.editor;
29
+ // Allow super attribute on text nodes.
30
+ editor.model.schema.extend('$text', { allowAttributes: SUPERSCRIPT });
31
+ editor.model.schema.setAttributeProperties(SUPERSCRIPT, {
32
+ isFormatting: true,
33
+ copyOnEnter: true
34
+ });
35
+ // Build converter from model to view for data and editing pipelines.
36
+ editor.conversion.attributeToElement({
37
+ model: SUPERSCRIPT,
38
+ view: 'sup',
39
+ upcastAlso: [
40
+ {
41
+ styles: {
42
+ 'vertical-align': 'super'
43
+ }
44
+ }
45
+ ]
46
+ });
47
+ // Create super command.
48
+ editor.commands.add(SUPERSCRIPT, new AttributeCommand(editor, SUPERSCRIPT));
49
+ }
50
+ }
@@ -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 basic-styles/superscript/superscriptui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- /**
10
- * The superscript UI feature. It introduces the Superscript button.
11
- */
12
- export default class SuperscriptUI extends Plugin {
13
- /**
14
- * @inheritDoc
15
- */
16
- static get pluginName(): "SuperscriptUI";
17
- /**
18
- * @inheritDoc
19
- */
20
- init(): 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 basic-styles/superscript/superscriptui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ /**
10
+ * The superscript UI feature. It introduces the Superscript button.
11
+ */
12
+ export default class SuperscriptUI extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "SuperscriptUI";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ init(): void;
21
+ }
@@ -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 basic-styles/superscript/superscriptui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import { ButtonView } from 'ckeditor5/src/ui';
10
- import superscriptIcon from '../../theme/icons/superscript.svg';
11
- const SUPERSCRIPT = 'superscript';
12
- /**
13
- * The superscript UI feature. It introduces the Superscript button.
14
- */
15
- export default class SuperscriptUI extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName() {
20
- return 'SuperscriptUI';
21
- }
22
- /**
23
- * @inheritDoc
24
- */
25
- init() {
26
- const editor = this.editor;
27
- const t = editor.t;
28
- // Add superscript button to feature components.
29
- editor.ui.componentFactory.add(SUPERSCRIPT, locale => {
30
- const command = editor.commands.get(SUPERSCRIPT);
31
- const view = new ButtonView(locale);
32
- view.set({
33
- label: t('Superscript'),
34
- icon: superscriptIcon,
35
- tooltip: true,
36
- isToggleable: true
37
- });
38
- view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
39
- // Execute command.
40
- this.listenTo(view, 'execute', () => {
41
- editor.execute(SUPERSCRIPT);
42
- editor.editing.view.focus();
43
- });
44
- return view;
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 basic-styles/superscript/superscriptui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import { ButtonView } from 'ckeditor5/src/ui';
10
+ import superscriptIcon from '../../theme/icons/superscript.svg';
11
+ const SUPERSCRIPT = 'superscript';
12
+ /**
13
+ * The superscript UI feature. It introduces the Superscript button.
14
+ */
15
+ export default class SuperscriptUI extends Plugin {
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName() {
20
+ return 'SuperscriptUI';
21
+ }
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ init() {
26
+ const editor = this.editor;
27
+ const t = editor.t;
28
+ // Add superscript button to feature components.
29
+ editor.ui.componentFactory.add(SUPERSCRIPT, locale => {
30
+ const command = editor.commands.get(SUPERSCRIPT);
31
+ const view = new ButtonView(locale);
32
+ view.set({
33
+ label: t('Superscript'),
34
+ icon: superscriptIcon,
35
+ tooltip: true,
36
+ isToggleable: true
37
+ });
38
+ view.bind('isOn', 'isEnabled').to(command, 'value', 'isEnabled');
39
+ // Execute command.
40
+ this.listenTo(view, 'execute', () => {
41
+ editor.execute(SUPERSCRIPT);
42
+ editor.editing.view.focus();
43
+ });
44
+ return view;
45
+ });
46
+ }
47
+ }
@@ -1,26 +1,26 @@
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 basic-styles/superscript
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import SuperscriptEditing from './superscript/superscriptediting';
10
- import SuperscriptUI from './superscript/superscriptui';
11
- /**
12
- * The superscript feature.
13
- *
14
- * It loads the {@link module:basic-styles/superscript/superscriptediting~SuperscriptEditing} and
15
- * {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.
16
- */
17
- export default class Superscript extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get requires(): readonly [typeof SuperscriptEditing, typeof SuperscriptUI];
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "Superscript";
26
- }
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 basic-styles/superscript
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import SuperscriptEditing from './superscript/superscriptediting';
10
+ import SuperscriptUI from './superscript/superscriptui';
11
+ /**
12
+ * The superscript feature.
13
+ *
14
+ * It loads the {@link module:basic-styles/superscript/superscriptediting~SuperscriptEditing} and
15
+ * {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.
16
+ */
17
+ export default class Superscript extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires(): readonly [typeof SuperscriptEditing, typeof SuperscriptUI];
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "Superscript";
26
+ }
@@ -1,30 +1,30 @@
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 basic-styles/superscript
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import SuperscriptEditing from './superscript/superscriptediting';
10
- import SuperscriptUI from './superscript/superscriptui';
11
- /**
12
- * The superscript feature.
13
- *
14
- * It loads the {@link module:basic-styles/superscript/superscriptediting~SuperscriptEditing} and
15
- * {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.
16
- */
17
- export default class Superscript extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get requires() {
22
- return [SuperscriptEditing, SuperscriptUI];
23
- }
24
- /**
25
- * @inheritDoc
26
- */
27
- static get pluginName() {
28
- return 'Superscript';
29
- }
30
- }
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 basic-styles/superscript
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import SuperscriptEditing from './superscript/superscriptediting';
10
+ import SuperscriptUI from './superscript/superscriptui';
11
+ /**
12
+ * The superscript feature.
13
+ *
14
+ * It loads the {@link module:basic-styles/superscript/superscriptediting~SuperscriptEditing} and
15
+ * {@link module:basic-styles/superscript/superscriptui~SuperscriptUI} plugins.
16
+ */
17
+ export default class Superscript extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires() {
22
+ return [SuperscriptEditing, SuperscriptUI];
23
+ }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName() {
28
+ return 'Superscript';
29
+ }
30
+ }
@@ -1,24 +1,24 @@
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 basic-styles/underline/underlineediting
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- /**
10
- * The underline editing feature.
11
- *
12
- * It registers the `'underline'` command, the <kbd>Ctrl+U</kbd> keystroke
13
- * and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.
14
- */
15
- export default class UnderlineEditing extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "UnderlineEditing";
20
- /**
21
- * @inheritDoc
22
- */
23
- init(): void;
24
- }
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 basic-styles/underline/underlineediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ /**
10
+ * The underline editing feature.
11
+ *
12
+ * It registers the `'underline'` command, the <kbd>Ctrl+U</kbd> keystroke
13
+ * and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.
14
+ */
15
+ export default class UnderlineEditing extends Plugin {
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "UnderlineEditing";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ init(): void;
24
+ }
@@ -1,49 +1,49 @@
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 basic-styles/underline/underlineediting
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- import AttributeCommand from '../attributecommand';
10
- const UNDERLINE = 'underline';
11
- /**
12
- * The underline editing feature.
13
- *
14
- * It registers the `'underline'` command, the <kbd>Ctrl+U</kbd> keystroke
15
- * and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.
16
- */
17
- export default class UnderlineEditing extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get pluginName() {
22
- return 'UnderlineEditing';
23
- }
24
- /**
25
- * @inheritDoc
26
- */
27
- init() {
28
- const editor = this.editor;
29
- // Allow strikethrough attribute on text nodes.
30
- editor.model.schema.extend('$text', { allowAttributes: UNDERLINE });
31
- editor.model.schema.setAttributeProperties(UNDERLINE, {
32
- isFormatting: true,
33
- copyOnEnter: true
34
- });
35
- editor.conversion.attributeToElement({
36
- model: UNDERLINE,
37
- view: 'u',
38
- upcastAlso: {
39
- styles: {
40
- 'text-decoration': 'underline'
41
- }
42
- }
43
- });
44
- // Create underline command.
45
- editor.commands.add(UNDERLINE, new AttributeCommand(editor, UNDERLINE));
46
- // Set the Ctrl+U keystroke.
47
- editor.keystrokes.set('CTRL+U', 'underline');
48
- }
49
- }
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 basic-styles/underline/underlineediting
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ import AttributeCommand from '../attributecommand';
10
+ const UNDERLINE = 'underline';
11
+ /**
12
+ * The underline editing feature.
13
+ *
14
+ * It registers the `'underline'` command, the <kbd>Ctrl+U</kbd> keystroke
15
+ * and introduces the `underline` attribute in the model which renders to the view as an `<u>` element.
16
+ */
17
+ export default class UnderlineEditing extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName() {
22
+ return 'UnderlineEditing';
23
+ }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ init() {
28
+ const editor = this.editor;
29
+ // Allow strikethrough attribute on text nodes.
30
+ editor.model.schema.extend('$text', { allowAttributes: UNDERLINE });
31
+ editor.model.schema.setAttributeProperties(UNDERLINE, {
32
+ isFormatting: true,
33
+ copyOnEnter: true
34
+ });
35
+ editor.conversion.attributeToElement({
36
+ model: UNDERLINE,
37
+ view: 'u',
38
+ upcastAlso: {
39
+ styles: {
40
+ 'text-decoration': 'underline'
41
+ }
42
+ }
43
+ });
44
+ // Create underline command.
45
+ editor.commands.add(UNDERLINE, new AttributeCommand(editor, UNDERLINE));
46
+ // Set the Ctrl+U keystroke.
47
+ editor.keystrokes.set('CTRL+U', 'underline');
48
+ }
49
+ }
@@ -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 basic-styles/underline/underlineui
7
- */
8
- import { Plugin } from 'ckeditor5/src/core';
9
- /**
10
- * The underline UI feature. It introduces the Underline button.
11
- */
12
- export default class UnderlineUI extends Plugin {
13
- /**
14
- * @inheritDoc
15
- */
16
- static get pluginName(): "UnderlineUI";
17
- /**
18
- * @inheritDoc
19
- */
20
- init(): 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 basic-styles/underline/underlineui
7
+ */
8
+ import { Plugin } from 'ckeditor5/src/core';
9
+ /**
10
+ * The underline UI feature. It introduces the Underline button.
11
+ */
12
+ export default class UnderlineUI extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "UnderlineUI";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ init(): void;
21
+ }