@ckeditor/ckeditor5-heading 42.0.2 → 43.0.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-heading",
3
- "version": "42.0.2",
3
+ "version": "43.0.0-alpha.0",
4
4
  "description": "Headings feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,12 +13,12 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-core": "42.0.2",
17
- "@ckeditor/ckeditor5-engine": "42.0.2",
18
- "@ckeditor/ckeditor5-paragraph": "42.0.2",
19
- "@ckeditor/ckeditor5-ui": "42.0.2",
20
- "@ckeditor/ckeditor5-utils": "42.0.2",
21
- "ckeditor5": "42.0.2"
16
+ "@ckeditor/ckeditor5-core": "43.0.0-alpha.0",
17
+ "@ckeditor/ckeditor5-engine": "43.0.0-alpha.0",
18
+ "@ckeditor/ckeditor5-paragraph": "43.0.0-alpha.0",
19
+ "@ckeditor/ckeditor5-ui": "43.0.0-alpha.0",
20
+ "@ckeditor/ckeditor5-utils": "43.0.0-alpha.0",
21
+ "ckeditor5": "43.0.0-alpha.0"
22
22
  },
23
23
  "author": "CKSource (http://cksource.com/)",
24
24
  "license": "GPL-2.0-or-later",
@@ -68,38 +68,12 @@ export interface HeadingConfig {
68
68
  /**
69
69
  * Heading option descriptor.
70
70
  */
71
- export type HeadingOption = HeadingElementOption | HeadingParagraphOption | HeadingCustomElementOption;
71
+ export type HeadingOption = HeadingElementOption | HeadingParagraphOption;
72
72
  export interface HeadingElementOption {
73
73
  /**
74
74
  * Name of the model element to convert.
75
75
  */
76
- model: 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6';
77
- /**
78
- * Definition of a view element to convert from/to.
79
- */
80
- view: ViewElementDefinition;
81
- /**
82
- * The user-readable title of the option.
83
- */
84
- title: string;
85
- /**
86
- * The class which will be added to the dropdown item representing this option.
87
- */
88
- class: string;
89
- /**
90
- * Icon used by {@link module:heading/headingbuttonsui~HeadingButtonsUI}. It can be omitted when using the default configuration.
91
- */
92
- icon?: string;
93
- /**
94
- * An array with all matched elements that the view-to-model conversion should also accept.
95
- */
96
- upcastAlso?: ArrayOrItem<ViewElementDefinition | MatcherPattern>;
97
- }
98
- export interface HeadingCustomElementOption {
99
- /**
100
- * Name of the model element to convert.
101
- */
102
- model: `heading${string}`;
76
+ model: 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | `heading${string}` & Record<never, never>;
103
77
  /**
104
78
  * Definition of a view element to convert from/to.
105
79
  */
package/src/headingui.js CHANGED
@@ -137,11 +137,11 @@ export default class HeadingUI extends Plugin {
137
137
  listItemView.children.add(buttonView);
138
138
  listView.items.add(listItemView);
139
139
  buttonView.set({
140
+ isToggleable: true,
140
141
  label: option.title,
141
142
  role: 'menuitemradio',
142
143
  class: option.class
143
144
  });
144
- buttonView.bind('ariaChecked').to(buttonView, 'isOn');
145
145
  buttonView.delegate('execute').to(menuView);
146
146
  buttonView.on('execute', () => {
147
147
  const commandName = option.model === 'paragraph' ? 'paragraph' : 'heading';
package/theme/heading.css CHANGED
@@ -3,15 +3,15 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
6
- .ck.ck-heading_heading1 {
6
+ .ck.ck-heading_heading1 .ck-button__label {
7
7
  font-size: 20px;
8
8
  }
9
9
 
10
- .ck.ck-heading_heading2 {
10
+ .ck.ck-heading_heading2 .ck-button__label {
11
11
  font-size: 17px;
12
12
  }
13
13
 
14
- .ck.ck-heading_heading3 {
14
+ .ck.ck-heading_heading3 .ck-button__label {
15
15
  font-size: 14px;
16
16
  }
17
17