@ckeditor/ckeditor5-style 48.2.0 → 48.3.0-alpha.1
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/dist/augmentation.d.ts +22 -22
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/index.js +1225 -1308
- package/dist/index.js.map +1 -1
- package/dist/integrations/link.d.ts +38 -38
- package/dist/integrations/list.d.ts +43 -43
- package/dist/integrations/table.d.ts +49 -49
- package/dist/style.d.ts +25 -25
- package/dist/stylecommand.d.ts +78 -78
- package/dist/styleconfig.d.ts +79 -79
- package/dist/styleediting.d.ts +33 -33
- package/dist/styleui.d.ts +29 -29
- package/dist/styleutils.d.ts +131 -131
- package/dist/ui/stylegridbuttonview.d.ts +31 -31
- package/dist/ui/stylegridview.d.ts +66 -66
- package/dist/ui/stylegroupview.d.ts +32 -32
- package/dist/ui/stylepanelview.d.ts +83 -83
- package/package.json +9 -9
package/dist/styleconfig.d.ts
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* @module style/styleconfig
|
|
7
|
+
*/
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
* The configuration of the style feature.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* ClassicEditor
|
|
13
|
+
* .create( {
|
|
14
|
+
* style: ... // Style feature config.
|
|
15
|
+
* } )
|
|
16
|
+
* .then( ... )
|
|
17
|
+
* .catch( ... );
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
21
|
+
*/
|
|
22
22
|
export interface StyleConfig {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The available style definitions.
|
|
25
|
+
*
|
|
26
|
+
* Style definitions are displayed in the `'style'` UI dropdown and get applied by the
|
|
27
|
+
* {@link module:style/stylecommand~StyleCommand style command} to the content of the document.
|
|
28
|
+
*
|
|
29
|
+
* In the `'style'` UI dropdown, definitions are automatically grouped into two categories based on the of the `element` property:
|
|
30
|
+
*
|
|
31
|
+
* * **Block styles**: Can be applied to entire {@link module:html-support/dataschema~DataSchema#registerBlockElement block elements}
|
|
32
|
+
* only (e.g. headings, paragraphs, divs).
|
|
33
|
+
* * **Text styles**: Can by applied to any {@link module:html-support/dataschema~DataSchema#registerInlineElement text} in any element
|
|
34
|
+
* in the document.
|
|
35
|
+
*
|
|
36
|
+
* An example configuration:
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* [
|
|
40
|
+
* // Definitions of block styles.
|
|
41
|
+
* {
|
|
42
|
+
* name: 'Red heading',
|
|
43
|
+
* element: 'h2',
|
|
44
|
+
* classes: [ 'red-heading' ]
|
|
45
|
+
* },
|
|
46
|
+
* {
|
|
47
|
+
* name: 'Vibrant code',
|
|
48
|
+
* element: 'pre',
|
|
49
|
+
* classes: [ 'vibrant-code' ]
|
|
50
|
+
* },
|
|
51
|
+
*
|
|
52
|
+
* // Definitions of text (inline) styles.
|
|
53
|
+
* {
|
|
54
|
+
* name: 'Marker',
|
|
55
|
+
* element: 'span',
|
|
56
|
+
* classes: [ 'marker' ]
|
|
57
|
+
* },
|
|
58
|
+
*
|
|
59
|
+
* // ...
|
|
60
|
+
* ]
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* **Note**: Configuring style definitions will automatically configure the
|
|
64
|
+
* {@glink features/html/general-html-support General HTML Support feature}. **You do not need to repeat the configuration in
|
|
65
|
+
* {@link module:html-support/generalhtmlsupportconfig~GeneralHtmlSupportConfig}**.
|
|
66
|
+
*/
|
|
67
|
+
definitions?: Array<StyleDefinition>;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
* Style definition.
|
|
71
|
+
*
|
|
72
|
+
* An object describing a style definition. It contains the style `name`, `element` name and an array of CSS `classes`.
|
|
73
|
+
*
|
|
74
|
+
* ```ts
|
|
75
|
+
* // This style will create <h2 class="foo">...</h2> in the document data.
|
|
76
|
+
* {
|
|
77
|
+
* name: 'Example style',
|
|
78
|
+
* element: 'h2',
|
|
79
|
+
* classes: [ 'foo' ]
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
83
|
export interface StyleDefinition {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
name: string;
|
|
85
|
+
element: string;
|
|
86
|
+
classes: Array<string>;
|
|
87
87
|
}
|
package/dist/styleediting.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { GeneralHtmlSupport } from
|
|
10
|
-
import { StyleUtils } from
|
|
11
|
-
import { ListStyleSupport } from
|
|
12
|
-
import { TableStyleSupport } from
|
|
13
|
-
import { LinkStyleSupport } from
|
|
6
|
+
* @module style/styleediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { GeneralHtmlSupport } from "@ckeditor/ckeditor5-html-support";
|
|
10
|
+
import { StyleUtils } from "./styleutils.js";
|
|
11
|
+
import { ListStyleSupport } from "./integrations/list.js";
|
|
12
|
+
import { TableStyleSupport } from "./integrations/table.js";
|
|
13
|
+
import { LinkStyleSupport } from "./integrations/link.js";
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
* The style engine feature.
|
|
16
|
+
*
|
|
17
|
+
* It configures the {@glink features/html/general-html-support General HTML Support feature} based on
|
|
18
|
+
* {@link module:style/styleconfig~StyleConfig#definitions configured style definitions} and introduces the
|
|
19
|
+
* {@link module:style/stylecommand~StyleCommand style command} that applies styles to the content of the document.
|
|
20
|
+
*/
|
|
21
21
|
export declare class StyleEditing extends Plugin {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "StyleEditing";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static override get isOfficialPlugin(): true;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get requires(): PluginDependenciesOf<[GeneralHtmlSupport, StyleUtils, ListStyleSupport, TableStyleSupport, LinkStyleSupport]>;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
init(): void;
|
|
38
38
|
}
|
package/dist/styleui.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { StyleUtils } from
|
|
10
|
-
import
|
|
6
|
+
* @module style/styleui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { StyleUtils } from "./styleutils.js";
|
|
10
|
+
import "../theme/style.css";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
* The UI plugin of the style feature .
|
|
13
|
+
*
|
|
14
|
+
* It registers the `'style'` UI dropdown in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
|
|
15
|
+
* that displays a grid of styles and allows changing styles of the content.
|
|
16
|
+
*/
|
|
17
17
|
export declare class StyleUI extends Plugin {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "StyleUI";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static override get isOfficialPlugin(): true;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get requires(): PluginDependenciesOf<[StyleUtils]>;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
init(): void;
|
|
34
34
|
}
|
package/dist/styleutils.d.ts
CHANGED
|
@@ -1,142 +1,142 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin, type Editor } from
|
|
9
|
-
import type { ModelElement, ModelDocumentSelection, ModelSelectable } from
|
|
10
|
-
import type { DecoratedMethodEvent } from
|
|
11
|
-
import type { TemplateDefinition } from
|
|
12
|
-
import type { DataSchema } from
|
|
13
|
-
import type { StyleDefinition } from
|
|
6
|
+
* @module style/styleutils
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import type { ModelElement, ModelDocumentSelection, ModelSelectable } from "@ckeditor/ckeditor5-engine";
|
|
10
|
+
import type { DecoratedMethodEvent } from "@ckeditor/ckeditor5-utils";
|
|
11
|
+
import type { TemplateDefinition } from "@ckeditor/ckeditor5-ui";
|
|
12
|
+
import type { DataSchema } from "@ckeditor/ckeditor5-html-support";
|
|
13
|
+
import type { StyleDefinition } from "./styleconfig.js";
|
|
14
14
|
export declare class StyleUtils extends Plugin {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
15
|
+
private _htmlSupport;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "StyleUtils";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static override get isOfficialPlugin(): true;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(editor: Editor);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
init(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Normalizes {@link module:style/styleconfig~StyleConfig#definitions} in the configuration of the styles feature.
|
|
34
|
+
* The structure of normalized styles looks as follows:
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* {
|
|
38
|
+
* block: [
|
|
39
|
+
* <module:style/style~StyleDefinition>,
|
|
40
|
+
* <module:style/style~StyleDefinition>,
|
|
41
|
+
* ...
|
|
42
|
+
* ],
|
|
43
|
+
* inline: [
|
|
44
|
+
* <module:style/style~StyleDefinition>,
|
|
45
|
+
* <module:style/style~StyleDefinition>,
|
|
46
|
+
* ...
|
|
47
|
+
* ]
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @returns An object with normalized style definitions grouped into `block` and `inline` categories (arrays).
|
|
52
|
+
*/
|
|
53
|
+
normalizeConfig(dataSchema: DataSchema, styleDefinitions?: Array<StyleDefinition>): NormalizedStyleDefinitions;
|
|
54
|
+
/**
|
|
55
|
+
* Verifies if the given style is applicable to the provided block element.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
isStyleEnabledForBlock(definition: BlockStyleDefinition, block: ModelElement): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Returns true if the given style is applied to the specified block element.
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
isStyleActiveForBlock(definition: BlockStyleDefinition, block: ModelElement): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Returns an array of block elements that style should be applied to.
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
getAffectedBlocks(definition: BlockStyleDefinition, block: ModelElement): Array<ModelElement> | null;
|
|
72
|
+
/**
|
|
73
|
+
* Verifies if the given style is applicable to the provided document selection.
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
isStyleEnabledForInlineSelection(definition: InlineStyleDefinition, selection: ModelDocumentSelection): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Returns true if the given style is applied to the specified document selection.
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
isStyleActiveForInlineSelection(definition: InlineStyleDefinition, selection: ModelDocumentSelection): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Returns a selectable that given style should be applied to.
|
|
86
|
+
*
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
getAffectedInlineSelectable(definition: InlineStyleDefinition, selection: ModelDocumentSelection): ModelSelectable;
|
|
90
|
+
/**
|
|
91
|
+
* Returns the `TemplateDefinition` used by styles dropdown to render style preview.
|
|
92
|
+
*
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
getStylePreview(definition: StyleDefinition, children: Iterable<TemplateDefinition>): TemplateDefinition;
|
|
96
|
+
/**
|
|
97
|
+
* Verifies if all classes are present in the given GHS attribute.
|
|
98
|
+
*
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
hasAllClasses(ghsAttributeValue: unknown, classes: Array<string>): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* This is where the styles feature configures the GHS feature. This method translates normalized
|
|
104
|
+
* {@link module:style/styleconfig~StyleDefinition style definitions} to
|
|
105
|
+
* {@link module:engine/view/matcher~MatcherObjectPattern matcher patterns} and feeds them to the GHS
|
|
106
|
+
* {@link module:html-support/datafilter~DataFilter} plugin.
|
|
107
|
+
*
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
configureGHSDataFilter({ block, inline }: NormalizedStyleDefinitions): void;
|
|
111
|
+
/**
|
|
112
|
+
* Checks the attribute value of the first node in the selection that allows the attribute.
|
|
113
|
+
* For the collapsed selection, returns the selection attribute.
|
|
114
|
+
*
|
|
115
|
+
* @param selection The document selection.
|
|
116
|
+
* @param attributeName Name of the GHS attribute.
|
|
117
|
+
* @returns The attribute value.
|
|
118
|
+
*/
|
|
119
|
+
private _getValueFromFirstAllowedNode;
|
|
120
120
|
}
|
|
121
121
|
export interface NormalizedStyleDefinitions {
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
block: Array<BlockStyleDefinition>;
|
|
123
|
+
inline: Array<InlineStyleDefinition>;
|
|
124
124
|
}
|
|
125
125
|
export interface BlockStyleDefinition extends StyleDefinition {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
isBlock: true;
|
|
127
|
+
modelElements: Array<string>;
|
|
128
|
+
previewTemplate: TemplateDefinition;
|
|
129
129
|
}
|
|
130
130
|
export interface InlineStyleDefinition extends StyleDefinition {
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
ghsAttributes: Array<string>;
|
|
132
|
+
previewTemplate: TemplateDefinition;
|
|
133
133
|
}
|
|
134
134
|
export type NormalizedStyleDefinition = BlockStyleDefinition | InlineStyleDefinition;
|
|
135
|
-
export type StyleUtilsIsEnabledForBlockEvent = DecoratedMethodEvent<StyleUtils,
|
|
136
|
-
export type StyleUtilsIsActiveForBlockEvent = DecoratedMethodEvent<StyleUtils,
|
|
137
|
-
export type StyleUtilsGetAffectedBlocksEvent = DecoratedMethodEvent<StyleUtils,
|
|
138
|
-
export type StyleUtilsIsStyleEnabledForInlineSelectionEvent = DecoratedMethodEvent<StyleUtils,
|
|
139
|
-
export type StyleUtilsIsStyleActiveForInlineSelectionEvent = DecoratedMethodEvent<StyleUtils,
|
|
140
|
-
export type StyleUtilsGetAffectedInlineSelectableEvent = DecoratedMethodEvent<StyleUtils,
|
|
141
|
-
export type StyleUtilsGetStylePreviewEvent = DecoratedMethodEvent<StyleUtils,
|
|
142
|
-
export type StyleUtilsConfigureGHSDataFilterEvent = DecoratedMethodEvent<StyleUtils,
|
|
135
|
+
export type StyleUtilsIsEnabledForBlockEvent = DecoratedMethodEvent<StyleUtils, "isStyleEnabledForBlock">;
|
|
136
|
+
export type StyleUtilsIsActiveForBlockEvent = DecoratedMethodEvent<StyleUtils, "isStyleActiveForBlock">;
|
|
137
|
+
export type StyleUtilsGetAffectedBlocksEvent = DecoratedMethodEvent<StyleUtils, "getAffectedBlocks">;
|
|
138
|
+
export type StyleUtilsIsStyleEnabledForInlineSelectionEvent = DecoratedMethodEvent<StyleUtils, "isStyleEnabledForInlineSelection">;
|
|
139
|
+
export type StyleUtilsIsStyleActiveForInlineSelectionEvent = DecoratedMethodEvent<StyleUtils, "isStyleActiveForInlineSelection">;
|
|
140
|
+
export type StyleUtilsGetAffectedInlineSelectableEvent = DecoratedMethodEvent<StyleUtils, "getAffectedInlineSelectable">;
|
|
141
|
+
export type StyleUtilsGetStylePreviewEvent = DecoratedMethodEvent<StyleUtils, "getStylePreview">;
|
|
142
|
+
export type StyleUtilsConfigureGHSDataFilterEvent = DecoratedMethodEvent<StyleUtils, "configureGHSDataFilter">;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { Locale } from
|
|
9
|
-
import { ButtonView, View } from
|
|
10
|
-
import type { NormalizedStyleDefinition } from
|
|
6
|
+
* @module style/ui/stylegridbuttonview
|
|
7
|
+
*/
|
|
8
|
+
import type { Locale } from "@ckeditor/ckeditor5-utils";
|
|
9
|
+
import { ButtonView, View } from "@ckeditor/ckeditor5-ui";
|
|
10
|
+
import type { NormalizedStyleDefinition } from "../styleutils.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
* A class representing an individual button (style) in the grid. Renders a rich preview of the style.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
16
|
export declare class StyleGridButtonView extends ButtonView {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Definition of the style the button will apply when executed.
|
|
19
|
+
*/
|
|
20
|
+
readonly styleDefinition: NormalizedStyleDefinition;
|
|
21
|
+
/**
|
|
22
|
+
* The view rendering the preview of the style.
|
|
23
|
+
*/
|
|
24
|
+
readonly previewView: View;
|
|
25
|
+
/**
|
|
26
|
+
* Creates an instance of the {@link module:style/ui/stylegridbuttonview~StyleGridButtonView} class.
|
|
27
|
+
*
|
|
28
|
+
* @param locale The localization services instance.
|
|
29
|
+
* @param styleDefinition Definition of the style.
|
|
30
|
+
*/
|
|
31
|
+
constructor(locale: Locale, styleDefinition: NormalizedStyleDefinition);
|
|
32
|
+
/**
|
|
33
|
+
* Creates the view representing the preview of the style.
|
|
34
|
+
*/
|
|
35
|
+
private _createPreview;
|
|
36
36
|
}
|