@ckeditor/ckeditor5-widget 48.3.1 → 48.4.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/dist/index-content.css +3 -0
- package/dist/index-content.css.map +1 -0
- package/dist/index-editor.css +343 -339
- package/dist/index-editor.css.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +65 -7
- package/dist/index.js.map +1 -1
- package/dist/widget.d.ts +0 -1
- package/dist/widgetresize.d.ts +0 -1
- package/dist/widgettypearound/utils.d.ts +34 -1
- package/dist/widgettypearound/widgettypearound.d.ts +0 -1
- package/package.json +8 -8
package/dist/widget.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
|
9
9
|
import { type ModelElement, type ModelNode, type ViewPosition, type ModelRange } from "@ckeditor/ckeditor5-engine";
|
|
10
10
|
import { Delete } from "@ckeditor/ckeditor5-typing";
|
|
11
11
|
import { WidgetTypeAround } from "./widgettypearound/widgettypearound.js";
|
|
12
|
-
import "../theme/widget.css";
|
|
13
12
|
/**
|
|
14
13
|
* The widget plugin. It enables base support for widgets.
|
|
15
14
|
*
|
package/dist/widgetresize.d.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { WidgetResizer } from "./widgetresize/resizer.js";
|
|
9
9
|
import { Plugin, type Editor } from "@ckeditor/ckeditor5-core";
|
|
10
10
|
import { type ModelElement, type ViewContainerElement } from "@ckeditor/ckeditor5-engine";
|
|
11
|
-
import "../theme/widgetresize.css";
|
|
12
11
|
/**
|
|
13
12
|
* The widget resize feature plugin.
|
|
14
13
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import { ModelDocumentSelection, type ViewDomConverter, type ModelElement, type ModelSchema, type ModelSelection, type ViewElement } from "@ckeditor/ckeditor5-engine";
|
|
6
6
|
/**
|
|
7
7
|
* The name of the type around model selection attribute responsible for
|
|
8
8
|
* displaying a fake caret next to a selected widget.
|
|
@@ -44,3 +44,36 @@ export declare function getClosestWidgetViewElement(domElement: HTMLElement, dom
|
|
|
44
44
|
* @returns The position of the fake caret or `null` when none is present.
|
|
45
45
|
*/
|
|
46
46
|
export declare function getTypeAroundFakeCaretPosition(selection: ModelSelection | ModelDocumentSelection): "before" | "after" | null;
|
|
47
|
+
/**
|
|
48
|
+
* Looks for the `copyOnEnter` text formatting attributes (e.g. bold, font color) carried by the last piece
|
|
49
|
+
* of inline content on the sibling that directly precedes a run of one or more consecutive block widgets.
|
|
50
|
+
*
|
|
51
|
+
* Used when the user inserts a new paragraph next to a widget (e.g. an image or a table) via the type-around
|
|
52
|
+
* UI: the new, empty paragraph should continue whatever formatting was active right before the widget,
|
|
53
|
+
* instead of starting unformatted:
|
|
54
|
+
*
|
|
55
|
+
* ```
|
|
56
|
+
* <paragraph><$text bold="true">Bar</$text></paragraph><imageBlock></imageBlock>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* Only the attributes carried by the *last* inline child of that sibling are considered - whatever precedes
|
|
60
|
+
* it doesn't matter, because it's the last piece of content that reflects what the user was typing right
|
|
61
|
+
* before reaching the widget:
|
|
62
|
+
*
|
|
63
|
+
* ```
|
|
64
|
+
* // "bold" IS recovered here: "Bar", the last child, is bold. "Foo" not being bold is irrelevant.
|
|
65
|
+
* <paragraph>Foo<$text bold="true">Bar</$text></paragraph><imageBlock></imageBlock>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* If there is more than one widget in a row, the search continues past all of them until a sibling with
|
|
69
|
+
* actual content (or the boundary of the parent) is found:
|
|
70
|
+
*
|
|
71
|
+
* ```
|
|
72
|
+
* <paragraph><$text bold="true">Bar</$text></paragraph><imageBlock></imageBlock><imageBlock></imageBlock>
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @param schema Model's schema.
|
|
76
|
+
* @param widgetElement The widget model element.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare function getCopyOnEnterTextAttributesBeforeWidgets(schema: ModelSchema, widgetElement: ModelElement): Array<[string, unknown]>;
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
9
|
import { Enter } from "@ckeditor/ckeditor5-enter";
|
|
10
10
|
import { Delete } from "@ckeditor/ckeditor5-typing";
|
|
11
|
-
import "../../theme/widgettypearound.css";
|
|
12
11
|
/**
|
|
13
12
|
* A plugin that allows users to type around widgets where normally it is impossible to place the caret due
|
|
14
13
|
* to limitations of web browsers. These "tight spots" occur, for instance, before (or after) a widget being
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-widget",
|
|
3
|
-
"version": "48.
|
|
3
|
+
"version": "48.4.0-alpha.0",
|
|
4
4
|
"description": "Widget API for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@ckeditor/ckeditor5-core": "48.
|
|
29
|
-
"@ckeditor/ckeditor5-engine": "48.
|
|
30
|
-
"@ckeditor/ckeditor5-enter": "48.
|
|
31
|
-
"@ckeditor/ckeditor5-icons": "48.
|
|
32
|
-
"@ckeditor/ckeditor5-ui": "48.
|
|
33
|
-
"@ckeditor/ckeditor5-utils": "48.
|
|
34
|
-
"@ckeditor/ckeditor5-typing": "48.
|
|
28
|
+
"@ckeditor/ckeditor5-core": "48.4.0-alpha.0",
|
|
29
|
+
"@ckeditor/ckeditor5-engine": "48.4.0-alpha.0",
|
|
30
|
+
"@ckeditor/ckeditor5-enter": "48.4.0-alpha.0",
|
|
31
|
+
"@ckeditor/ckeditor5-icons": "48.4.0-alpha.0",
|
|
32
|
+
"@ckeditor/ckeditor5-ui": "48.4.0-alpha.0",
|
|
33
|
+
"@ckeditor/ckeditor5-utils": "48.4.0-alpha.0",
|
|
34
|
+
"@ckeditor/ckeditor5-typing": "48.4.0-alpha.0",
|
|
35
35
|
"es-toolkit": "1.45.1"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|