ckeditor5-elements 49.0.0-alpha.0 → 49.0.0-alpha.4
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/README.md +19 -12
- package/dist/index.css +43 -3
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/validateSchema.d.ts +9 -0
- package/dist/validateSchema.d.ts.map +1 -0
- package/dist/validateSchema.js +9 -0
- package/dist/validateSchema.js.map +1 -0
- package/package.json +14 -8
- package/src/index.ts +8 -5
- package/src/validateSchema.ts +9 -0
package/README.md
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
# ckeditor5-elements
|
|
2
2
|
|
|
3
|
-
Element-level features for CKEditor 5 v49
|
|
4
|
-
|
|
5
|
-
| Feature | Exports
|
|
6
|
-
| -------------------- |
|
|
7
|
-
| Commands and buttons | `ElementOrPositionCommand`, `ElementCommand`, `ElementOrPositionButtonView`, `ElementButtonView`
|
|
8
|
-
| Element menu | `ElementMenu` (the plugin that shows the menus below), `ElementMenuView`
|
|
9
|
-
| Context menu | `ElementContextMenu`: a menu of commands for the right-clicked element (or Shift+F10)
|
|
10
|
-
| Clipboard | `ElementClipboard`: `copyElement`, `cutElement`, `pasteElement`, `pasteElementBefore`, `pasteElementAfter`
|
|
11
|
-
|
|
|
12
|
-
|
|
|
3
|
+
Element-level features for CKEditor 5 v49, in one package:
|
|
4
|
+
|
|
5
|
+
| Feature | Exports |
|
|
6
|
+
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| Commands and buttons | `ElementOrPositionCommand`, `ElementCommand`, `ElementOrPositionButtonView`, `ElementButtonView` |
|
|
8
|
+
| Element menu | `ElementMenu` (the plugin that shows the menus below), `ElementMenuView` |
|
|
9
|
+
| Context menu | `ElementContextMenu`: a menu of commands for the right-clicked element (or Shift+F10) |
|
|
10
|
+
| Clipboard | `ElementClipboard`: `copyElement`, `cutElement`, `pasteElement`, `pasteElementBefore`, `pasteElementAfter` |
|
|
11
|
+
| Actions | `ElementActions`: `moveElementUp`, `moveElementDown`, `duplicateElement`, `deleteElement` |
|
|
12
|
+
| Attributes | `ElementAttributes`: `showElementAttributes` shows the attributes of an element in a modal |
|
|
13
|
+
| Element schema | `ElementSchema`: declare elements from a JSON file, with three types of elements and a validation; `validateElementSchema()` |
|
|
14
|
+
| Element toolbar | `ElementToolbar`: floating toolbars for the elements that match a name or a filter |
|
|
15
|
+
| Selectable elements | `ElementSelectable`: select an element as a whole, by a click or by the arrow keys, without widgets |
|
|
16
|
+
| Clickable elements | `ElementClickable`: a callback with the model element when an element is clicked or double-clicked |
|
|
17
|
+
| Quick insert | `QuickInsert`: Alt+Enter opens a searchable list of the elements allowed at the cursor |
|
|
18
|
+
| Breadcrumbs | `Breadcrumbs`: the element path at the cursor, as labels or buttons that open the element menu |
|
|
13
19
|
|
|
14
20
|
## Installation
|
|
15
21
|
|
|
@@ -51,14 +57,15 @@ await ClassicEditor.create({
|
|
|
51
57
|
|
|
52
58
|
Load only the plugins you use: the others are not part of your build.
|
|
53
59
|
|
|
54
|
-
The features come in packages of their own (`ckeditor5-elements-core`, `-
|
|
55
|
-
`-breadcrumbs`), in the same version as this package, which installs them. Do not install or import them yourself: two
|
|
60
|
+
The features come in packages of their own (`ckeditor5-elements-core`, `-actions`, `-attributes`, `-schema`, `-interaction`, `-toolbar`, `-menu`), in the same version as this package, which installs them. Do not install or import them yourself: two
|
|
56
61
|
versions of them would be loaded, which fails.
|
|
57
62
|
|
|
58
63
|
## Documentation
|
|
59
64
|
|
|
60
65
|
[CKEditor 5 Elements documentation](https://ivankild.github.io/ckeditor5-elements/): guides with live examples, and the API reference.
|
|
61
66
|
|
|
67
|
+
The [full example](https://ivankild.github.io/ckeditor5-elements/example) shows all the features together in one editor.
|
|
68
|
+
|
|
62
69
|
## License
|
|
63
70
|
|
|
64
71
|
MIT
|
package/dist/index.css
CHANGED
|
@@ -1,4 +1,46 @@
|
|
|
1
|
-
/* ckeditor5-elements-
|
|
1
|
+
/* ckeditor5-elements-attributes */
|
|
2
|
+
/*
|
|
3
|
+
* The table of the attributes dialog. It is excluded from CKEditor's reset (`ck-reset_all-excluded`), so it has its own
|
|
4
|
+
* styles.
|
|
5
|
+
*/
|
|
6
|
+
.ck-elements-attributes table {
|
|
7
|
+
width: min(32em, 80vw);
|
|
8
|
+
border-collapse: collapse;
|
|
9
|
+
table-layout: fixed;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ck-elements-attributes th,
|
|
13
|
+
.ck-elements-attributes td {
|
|
14
|
+
padding: 0.3em 0.8em;
|
|
15
|
+
border-bottom: 1px solid var(--ck-color-base-border);
|
|
16
|
+
text-align: left;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
/* The dialog does not wrap its content, but long values, such as the data of an image, must wrap. */
|
|
19
|
+
white-space: normal;
|
|
20
|
+
overflow-wrap: anywhere;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ck-elements-attributes th {
|
|
24
|
+
width: 7em;
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ck-elements-attributes .ck-elements-attributes__empty {
|
|
29
|
+
color: var(--ck-color-text);
|
|
30
|
+
opacity: 0.65;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ckeditor5-elements-interaction */
|
|
34
|
+
/*
|
|
35
|
+
* A selected element: the editing view marks it with this class, and the selection is a fake one, so the browser draws
|
|
36
|
+
* nothing on the element itself.
|
|
37
|
+
*/
|
|
38
|
+
.ck-content .ck-elements-selected {
|
|
39
|
+
outline: 2px solid var(--ck-color-focus-border);
|
|
40
|
+
outline-offset: 1px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* ckeditor5-elements-menu */
|
|
2
44
|
/*
|
|
3
45
|
* The menu of an element is CKEditor's dropdown menu, so CKEditor styles it. Only the alignment of labels is added.
|
|
4
46
|
*/
|
|
@@ -14,7 +56,6 @@
|
|
|
14
56
|
margin-inline-start: calc(var(--ck-icon-size) + var(--ck-button-icon-gap));
|
|
15
57
|
}
|
|
16
58
|
|
|
17
|
-
/* ckeditor5-elements-breadcrumbs */
|
|
18
59
|
/*
|
|
19
60
|
* The element path: ancestors are muted, the innermost element (where the cursor is) is emphasised. Items are separated
|
|
20
61
|
* by chevrons. Buttons (with a menu) and labels (without one) look the same, except buttons react to hover and focus.
|
|
@@ -119,7 +160,6 @@
|
|
|
119
160
|
pointer-events: none;
|
|
120
161
|
}
|
|
121
162
|
|
|
122
|
-
/* ckeditor5-elements-quick-insert */
|
|
123
163
|
.ck.ck-elements-quick-insert {
|
|
124
164
|
width: 260px;
|
|
125
165
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CKEditor 5 Elements: commands that act on an element and their buttons, the element menu, the element context menu,
|
|
3
|
-
* clipboard
|
|
3
|
+
* element actions (move, duplicate, delete, and the clipboard), element attributes, an element schema, selectable and
|
|
4
|
+
* clickable elements, element toolbars, quick insert and breadcrumbs.
|
|
4
5
|
*
|
|
5
6
|
* This package brings them all, as `ckeditor5` does for CKEditor: install it, and import everything from it. Its
|
|
6
7
|
* stylesheet, `ckeditor5-elements/index.css`, has the styles of all of them.
|
|
@@ -8,8 +9,10 @@
|
|
|
8
9
|
* @module ckeditor5-elements
|
|
9
10
|
*/
|
|
10
11
|
export * from 'ckeditor5-elements-core';
|
|
11
|
-
export * from 'ckeditor5-elements-
|
|
12
|
-
export * from 'ckeditor5-elements-
|
|
13
|
-
export * from 'ckeditor5-elements-
|
|
14
|
-
export * from 'ckeditor5-elements-
|
|
12
|
+
export * from 'ckeditor5-elements-actions';
|
|
13
|
+
export * from 'ckeditor5-elements-schema';
|
|
14
|
+
export * from 'ckeditor5-elements-interaction';
|
|
15
|
+
export * from 'ckeditor5-elements-attributes';
|
|
16
|
+
export * from 'ckeditor5-elements-toolbar';
|
|
17
|
+
export * from 'ckeditor5-elements-menu';
|
|
15
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CKEditor 5 Elements: commands that act on an element and their buttons, the element menu, the element context menu,
|
|
3
|
-
* clipboard
|
|
3
|
+
* element actions (move, duplicate, delete, and the clipboard), element attributes, an element schema, selectable and
|
|
4
|
+
* clickable elements, element toolbars, quick insert and breadcrumbs.
|
|
4
5
|
*
|
|
5
6
|
* This package brings them all, as `ckeditor5` does for CKEditor: install it, and import everything from it. Its
|
|
6
7
|
* stylesheet, `ckeditor5-elements/index.css`, has the styles of all of them.
|
|
@@ -8,8 +9,10 @@
|
|
|
8
9
|
* @module ckeditor5-elements
|
|
9
10
|
*/
|
|
10
11
|
export * from 'ckeditor5-elements-core';
|
|
11
|
-
export * from 'ckeditor5-elements-
|
|
12
|
-
export * from 'ckeditor5-elements-
|
|
13
|
-
export * from 'ckeditor5-elements-
|
|
14
|
-
export * from 'ckeditor5-elements-
|
|
12
|
+
export * from 'ckeditor5-elements-actions';
|
|
13
|
+
export * from 'ckeditor5-elements-schema';
|
|
14
|
+
export * from 'ckeditor5-elements-interaction';
|
|
15
|
+
export * from 'ckeditor5-elements-attributes';
|
|
16
|
+
export * from 'ckeditor5-elements-toolbar';
|
|
17
|
+
export * from 'ckeditor5-elements-menu';
|
|
15
18
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The validation of an element schema without CKEditor, so that it works in Node.js, e.g. to validate a schema file in a
|
|
3
|
+
* test or in CI: `import { validateElementSchema } from 'ckeditor5-elements/validate-schema'`. The main entry loads
|
|
4
|
+
* CKEditor, which needs a DOM.
|
|
5
|
+
*
|
|
6
|
+
* @module ckeditor5-elements/validate-schema
|
|
7
|
+
*/
|
|
8
|
+
export * from 'ckeditor5-elements-schema/validate';
|
|
9
|
+
//# sourceMappingURL=validateSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSchema.d.ts","sourceRoot":"","sources":["../src/validateSchema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The validation of an element schema without CKEditor, so that it works in Node.js, e.g. to validate a schema file in a
|
|
3
|
+
* test or in CI: `import { validateElementSchema } from 'ckeditor5-elements/validate-schema'`. The main entry loads
|
|
4
|
+
* CKEditor, which needs a DOM.
|
|
5
|
+
*
|
|
6
|
+
* @module ckeditor5-elements/validate-schema
|
|
7
|
+
*/
|
|
8
|
+
export * from 'ckeditor5-elements-schema/validate';
|
|
9
|
+
//# sourceMappingURL=validateSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSchema.js","sourceRoot":"","sources":["../src/validateSchema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,oCAAoC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ckeditor5-elements",
|
|
3
|
-
"version": "49.0.0-alpha.
|
|
4
|
-
"description": "Element commands, an element context menu, clipboard commands, quick insert and breadcrumbs for CKEditor 5.",
|
|
3
|
+
"version": "49.0.0-alpha.4",
|
|
4
|
+
"description": "Element commands, an element context menu, element actions and clipboard commands, element attributes, an element schema, selectable and clickable elements, element toolbars, quick insert and breadcrumbs for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
7
7
|
"ckeditor5",
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"import": "./dist/index.js"
|
|
30
30
|
},
|
|
31
31
|
"./index.css": "./dist/index.css",
|
|
32
|
+
"./validate-schema": {
|
|
33
|
+
"types": "./dist/validateSchema.d.ts",
|
|
34
|
+
"import": "./dist/validateSchema.js"
|
|
35
|
+
},
|
|
32
36
|
"./package.json": "./package.json"
|
|
33
37
|
},
|
|
34
38
|
"files": [
|
|
@@ -40,14 +44,16 @@
|
|
|
40
44
|
"*.css"
|
|
41
45
|
],
|
|
42
46
|
"dependencies": {
|
|
43
|
-
"ckeditor5-elements-
|
|
44
|
-
"ckeditor5-elements-
|
|
45
|
-
"ckeditor5-elements-
|
|
46
|
-
"ckeditor5-elements-
|
|
47
|
-
"ckeditor5-elements-
|
|
47
|
+
"ckeditor5-elements-actions": "49.0.0-alpha.4",
|
|
48
|
+
"ckeditor5-elements-attributes": "49.0.0-alpha.4",
|
|
49
|
+
"ckeditor5-elements-core": "49.0.0-alpha.4",
|
|
50
|
+
"ckeditor5-elements-interaction": "49.0.0-alpha.4",
|
|
51
|
+
"ckeditor5-elements-menu": "49.0.0-alpha.4",
|
|
52
|
+
"ckeditor5-elements-schema": "49.0.0-alpha.4",
|
|
53
|
+
"ckeditor5-elements-toolbar": "49.0.0-alpha.4"
|
|
48
54
|
},
|
|
49
55
|
"peerDependencies": {
|
|
50
|
-
"ckeditor5": "
|
|
56
|
+
"ckeditor5": "^49.0.0"
|
|
51
57
|
},
|
|
52
58
|
"scripts": {
|
|
53
59
|
"build": "tsc --build && node ../../scripts/buildUmbrellaStyles.js"
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CKEditor 5 Elements: commands that act on an element and their buttons, the element menu, the element context menu,
|
|
3
|
-
* clipboard
|
|
3
|
+
* element actions (move, duplicate, delete, and the clipboard), element attributes, an element schema, selectable and
|
|
4
|
+
* clickable elements, element toolbars, quick insert and breadcrumbs.
|
|
4
5
|
*
|
|
5
6
|
* This package brings them all, as `ckeditor5` does for CKEditor: install it, and import everything from it. Its
|
|
6
7
|
* stylesheet, `ckeditor5-elements/index.css`, has the styles of all of them.
|
|
@@ -9,7 +10,9 @@
|
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
export * from 'ckeditor5-elements-core';
|
|
12
|
-
export * from 'ckeditor5-elements-
|
|
13
|
-
export * from 'ckeditor5-elements-
|
|
14
|
-
export * from 'ckeditor5-elements-
|
|
15
|
-
export * from 'ckeditor5-elements-
|
|
13
|
+
export * from 'ckeditor5-elements-actions';
|
|
14
|
+
export * from 'ckeditor5-elements-schema';
|
|
15
|
+
export * from 'ckeditor5-elements-interaction';
|
|
16
|
+
export * from 'ckeditor5-elements-attributes';
|
|
17
|
+
export * from 'ckeditor5-elements-toolbar';
|
|
18
|
+
export * from 'ckeditor5-elements-menu';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The validation of an element schema without CKEditor, so that it works in Node.js, e.g. to validate a schema file in a
|
|
3
|
+
* test or in CI: `import { validateElementSchema } from 'ckeditor5-elements/validate-schema'`. The main entry loads
|
|
4
|
+
* CKEditor, which needs a DOM.
|
|
5
|
+
*
|
|
6
|
+
* @module ckeditor5-elements/validate-schema
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export * from 'ckeditor5-elements-schema/validate';
|