@ckeditor/ckeditor5-ui 48.1.1 → 48.2.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/editableui/editableuiview.d.ts +15 -4
- package/dist/editableui/inline/inlineeditableuiview.d.ts +6 -4
- package/dist/index-editor.css +12 -0
- package/dist/index.css +12 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +37 -20
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { View } from '../view.js';
|
|
9
9
|
import type { EditingView } from '@ckeditor/ckeditor5-engine';
|
|
10
|
-
import type
|
|
10
|
+
import { type Locale } from '@ckeditor/ckeditor5-utils';
|
|
11
|
+
import type { ViewRootElementDefinition } from '@ckeditor/ckeditor5-core';
|
|
11
12
|
/**
|
|
12
13
|
* The editable UI view class.
|
|
13
14
|
*/
|
|
@@ -22,6 +23,15 @@ export declare class EditableUIView extends View {
|
|
|
22
23
|
* @observable
|
|
23
24
|
*/
|
|
24
25
|
isFocused: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether this editable is bound to an inline root (a root that only holds inline content, with no block children).
|
|
28
|
+
* Set by the editor's UI initialization, after plugin schema registrations have settled. When `true`, a
|
|
29
|
+
* `ck-editor__editable_inline-root` CSS class is added to the element so themes can distinguish inline roots from
|
|
30
|
+
* block ones; the placeholder helper also reads it to decide where to host the placeholder.
|
|
31
|
+
*
|
|
32
|
+
* @observable
|
|
33
|
+
*/
|
|
34
|
+
isInlineRoot: boolean;
|
|
25
35
|
/**
|
|
26
36
|
* The editing view instance the editable is related to. Editable uses the editing
|
|
27
37
|
* view to dynamically modify its certain DOM attributes after {@link #render rendering}.
|
|
@@ -45,10 +55,11 @@ export declare class EditableUIView extends View {
|
|
|
45
55
|
*
|
|
46
56
|
* @param locale The locale instance.
|
|
47
57
|
* @param editingView The editing view instance the editable is related to.
|
|
48
|
-
* @param editableElement The editable element. If
|
|
49
|
-
*
|
|
58
|
+
* @param editableElement The editable element. If an existing `HTMLElement` is passed, the view applies its
|
|
59
|
+
* template to it; otherwise the view creates a fresh element (a `<div>` by default, or one matching the given
|
|
60
|
+
* {@link module:core/editor/editorconfig~ViewRootElementDefinition}).
|
|
50
61
|
*/
|
|
51
|
-
constructor(locale: Locale, editingView: EditingView, editableElement?: HTMLElement);
|
|
62
|
+
constructor(locale: Locale, editingView: EditingView, editableElement?: HTMLElement | ViewRootElementDefinition);
|
|
52
63
|
/**
|
|
53
64
|
* Renders the view by either applying the {@link #template} to the existing
|
|
54
65
|
* {@link module:ui/editableui/editableuiview~EditableUIView#_editableElement} or assigning {@link #element}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { EditableUIView } from '../editableuiview.js';
|
|
9
9
|
import type { EditingView } from '@ckeditor/ckeditor5-engine';
|
|
10
10
|
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
11
|
+
import type { ViewRootElementDefinition } from '@ckeditor/ckeditor5-core';
|
|
11
12
|
/**
|
|
12
13
|
* The inline editable UI class implementing an inline {@link module:ui/editableui/editableuiview~EditableUIView}.
|
|
13
14
|
*/
|
|
@@ -21,14 +22,15 @@ export declare class InlineEditableUIView extends EditableUIView {
|
|
|
21
22
|
*
|
|
22
23
|
* @param locale The locale instance.
|
|
23
24
|
* @param editingView The editing view instance the editable is related to.
|
|
24
|
-
* @param editableElement The editable element.
|
|
25
|
-
* {@link module:
|
|
26
|
-
*
|
|
25
|
+
* @param editableElement The editable element. May be an existing `HTMLElement`, a
|
|
26
|
+
* {@link module:core/editor/editorconfig~ViewRootElementDefinition} describing the element to create,
|
|
27
|
+
* or `undefined` to create a default `<div>` element. See
|
|
28
|
+
* {@link module:ui/editableui/editableuiview~EditableUIView}.
|
|
27
29
|
* @param options Additional configuration of the view.
|
|
28
30
|
* @param options.label The label of the editable for assistive technologies. If not provided, a default label is used or,
|
|
29
31
|
* the existing `aria-label` attribute value from the specified `editableElement` is preserved.
|
|
30
32
|
*/
|
|
31
|
-
constructor(locale: Locale, editingView: EditingView, editableElement?: HTMLElement, options?: InlineEditableUIViewOptions);
|
|
33
|
+
constructor(locale: Locale, editingView: EditingView, editableElement?: HTMLElement | ViewRootElementDefinition, options?: InlineEditableUIViewOptions);
|
|
32
34
|
/**
|
|
33
35
|
* @inheritDoc
|
|
34
36
|
*/
|
package/dist/index-editor.css
CHANGED
|
@@ -1406,6 +1406,18 @@
|
|
|
1406
1406
|
right:-1px;
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
|
+
:is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__action:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover){
|
|
1410
|
+
background-color:var(--ck-color-button-on-background);
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
:is(:is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__action:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover)):after{
|
|
1414
|
+
display:none;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover > .ck-splitbutton__action:not(.ck-disabled), .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover > .ck-splitbutton__arrow:not(.ck-disabled), .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover){
|
|
1418
|
+
background-color:var(--ck-color-button-on-hover-background);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1409
1421
|
.ck.ck-splitbutton{
|
|
1410
1422
|
font-size:inherit;
|
|
1411
1423
|
}
|
package/dist/index.css
CHANGED
|
@@ -1406,6 +1406,18 @@
|
|
|
1406
1406
|
right: -1px;
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
|
+
:is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__action:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {
|
|
1410
|
+
background-color: var(--ck-color-button-on-background);
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
:is(:is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__action:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled), :is(.ck.ck-splitbutton.ck-splitbutton_flatten:hover, .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open) > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover)):after {
|
|
1414
|
+
display: none;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover > .ck-splitbutton__action:not(.ck-disabled), .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover > .ck-splitbutton__arrow:not(.ck-disabled), .ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {
|
|
1418
|
+
background-color: var(--ck-color-button-on-hover-background);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1409
1421
|
.ck.ck-splitbutton {
|
|
1410
1422
|
font-size: inherit;
|
|
1411
1423
|
}
|