ckeditor5-elements 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +70 -2
- package/dist/index.css +174 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- 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 +58 -3
- package/src/index.ts +18 -0
- package/src/validateSchema.ts +9 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ivan Kildyushov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ckeditor5-elements
|
|
2
2
|
|
|
3
|
-
|
|
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 |
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install ckeditor5 ckeditor5-elements
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Import the features from `ckeditor5-elements`, and its stylesheet, which styles all of them:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { ClassicEditor, Essentials, Paragraph } from 'ckeditor5';
|
|
32
|
+
import { Breadcrumbs, ElementClipboard, ElementContextMenu, QuickInsert } from 'ckeditor5-elements';
|
|
33
|
+
|
|
34
|
+
import 'ckeditor5/ckeditor5.css';
|
|
35
|
+
import 'ckeditor5-elements/index.css';
|
|
36
|
+
|
|
37
|
+
const menu = (element, editor) => [
|
|
38
|
+
{
|
|
39
|
+
title: 'Insert',
|
|
40
|
+
items: [editor.commands.get('quickInsertBefore'), editor.commands.get('quickInsertAfter')]
|
|
41
|
+
},
|
|
42
|
+
'|',
|
|
43
|
+
editor.commands.get('copyElement'),
|
|
44
|
+
editor.commands.get('cutElement'),
|
|
45
|
+
editor.commands.get('pasteElement')
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
await ClassicEditor.create({
|
|
49
|
+
attachTo: document.querySelector('#editor'),
|
|
50
|
+
licenseKey: 'GPL',
|
|
51
|
+
plugins: [Essentials, Paragraph, ElementContextMenu, ElementClipboard, QuickInsert, Breadcrumbs],
|
|
52
|
+
toolbar: ['undo', 'redo', '|', 'breadcrumbs'],
|
|
53
|
+
elementContextMenu: menu,
|
|
54
|
+
breadcrumbs: { menu }
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Load only the plugins you use: the others are not part of your build.
|
|
59
|
+
|
|
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
|
|
61
|
+
versions of them would be loaded, which fails.
|
|
62
|
+
|
|
63
|
+
## Documentation
|
|
64
|
+
|
|
65
|
+
[CKEditor 5 Elements documentation](https://ivankild.github.io/ckeditor5-elements/): guides with live examples, and the API reference.
|
|
66
|
+
|
|
67
|
+
The [full example](https://ivankild.github.io/ckeditor5-elements/example) shows all the features together in one editor.
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
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 */
|
|
44
|
+
/*
|
|
45
|
+
* The menu of an element is CKEditor's dropdown menu, so CKEditor styles it. Only the alignment of labels is added.
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/* In a menu with icons (or a nested menu of it), items without an icon get the space of one, so that all labels line up. */
|
|
49
|
+
:is(.ck.ck-elements-menu, .ck.ck-elements-menu__panel > .ck-dropdown-menu-list):has(
|
|
50
|
+
> .ck-list__item > :is(.ck-button, .ck-dropdown-menu-list__nested-menu > .ck-button) > .ck-button__icon
|
|
51
|
+
)
|
|
52
|
+
> .ck-list__item
|
|
53
|
+
> :is(.ck-button, .ck-dropdown-menu-list__nested-menu > .ck-button):not(:has(> .ck-button__icon))
|
|
54
|
+
> .ck-button__label {
|
|
55
|
+
/* The width of an icon, and the gap after it. */
|
|
56
|
+
margin-inline-start: calc(var(--ck-icon-size) + var(--ck-button-icon-gap));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
* The element path: ancestors are muted, the innermost element (where the cursor is) is emphasised. Items are separated
|
|
61
|
+
* by chevrons. Buttons (with a menu) and labels (without one) look the same, except buttons react to hover and focus.
|
|
62
|
+
*/
|
|
63
|
+
.ck.ck-elements-breadcrumbs {
|
|
64
|
+
--ck-elements-breadcrumbs-item-height: 24px;
|
|
65
|
+
--ck-elements-breadcrumbs-separator-size: 0.38em;
|
|
66
|
+
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
font-size: var(--ck-font-size-sm);
|
|
71
|
+
color: var(--ck-color-text);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ck.ck-toolbar .ck.ck-elements-breadcrumbs {
|
|
75
|
+
min-height: var(--ck-size-control-min-height);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ck.ck-elements-breadcrumbs__list {
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: 2px 0;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 0;
|
|
86
|
+
list-style: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ck.ck-elements-breadcrumbs__list-item {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
margin: 0;
|
|
94
|
+
padding: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Both item kinds: buttons and labels. */
|
|
98
|
+
.ck.ck-elements-breadcrumbs__item,
|
|
99
|
+
.ck.ck-button.ck-elements-breadcrumbs__item {
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
min-width: 0;
|
|
103
|
+
min-height: var(--ck-elements-breadcrumbs-item-height);
|
|
104
|
+
height: var(--ck-elements-breadcrumbs-item-height);
|
|
105
|
+
padding: 0 var(--ck-spacing-sm);
|
|
106
|
+
border-radius: var(--ck-border-radius-control);
|
|
107
|
+
font-family: var(--ck-font-family);
|
|
108
|
+
font-size: inherit;
|
|
109
|
+
line-height: 1;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
color: color-mix(in srgb, var(--ck-color-text) 65%, transparent);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ck.ck-button.ck-elements-breadcrumbs__item .ck-button__label {
|
|
115
|
+
font-size: inherit;
|
|
116
|
+
line-height: 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* The innermost element: where the cursor is. */
|
|
120
|
+
.ck.ck-elements-breadcrumbs__item[aria-current] {
|
|
121
|
+
color: var(--ck-color-text);
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Labels cannot be clicked, but can be focused with the keyboard. */
|
|
126
|
+
.ck.ck-elements-breadcrumbs__label {
|
|
127
|
+
cursor: default;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ck.ck-elements-breadcrumbs__label:focus {
|
|
131
|
+
outline: none;
|
|
132
|
+
box-shadow:
|
|
133
|
+
0 0 0 1px var(--ck-color-focus-border),
|
|
134
|
+
var(--ck-focus-shadow);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Buttons show they can be clicked. */
|
|
138
|
+
.ck.ck-button.ck-elements-breadcrumbs__item:hover,
|
|
139
|
+
.ck.ck-button.ck-elements-breadcrumbs__item:focus,
|
|
140
|
+
.ck.ck-button.ck-elements-breadcrumbs__item.ck-on {
|
|
141
|
+
color: var(--ck-color-text);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* A chevron between items, in the gap before each item, so it is not part of a button's hover area. */
|
|
145
|
+
.ck.ck-elements-breadcrumbs__list-item + .ck.ck-elements-breadcrumbs__list-item {
|
|
146
|
+
position: relative;
|
|
147
|
+
margin-left: calc(var(--ck-spacing-base) + var(--ck-elements-breadcrumbs-separator-size));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ck.ck-elements-breadcrumbs__list-item + .ck.ck-elements-breadcrumbs__list-item::before {
|
|
151
|
+
content: '';
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: 50%;
|
|
154
|
+
left: calc(-0.5 * var(--ck-spacing-base) - var(--ck-elements-breadcrumbs-separator-size));
|
|
155
|
+
width: var(--ck-elements-breadcrumbs-separator-size);
|
|
156
|
+
height: var(--ck-elements-breadcrumbs-separator-size);
|
|
157
|
+
border-top: 1.5px solid color-mix(in srgb, var(--ck-color-text) 40%, transparent);
|
|
158
|
+
border-right: 1.5px solid color-mix(in srgb, var(--ck-color-text) 40%, transparent);
|
|
159
|
+
transform: translateY(-50%) rotate(45deg);
|
|
160
|
+
pointer-events: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.ck.ck-elements-quick-insert {
|
|
164
|
+
width: 260px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.ck.ck-elements-quick-insert .ck-search__results {
|
|
168
|
+
max-height: 240px;
|
|
169
|
+
overflow-y: auto;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.ck.ck-elements-quick-insert .ck-list__item > .ck.ck-button {
|
|
173
|
+
width: 100%;
|
|
174
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CKEditor 5 Elements: commands that act on an element and their buttons, the element menu, the element context menu,
|
|
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.
|
|
5
|
+
*
|
|
6
|
+
* This package brings them all, as `ckeditor5` does for CKEditor: install it, and import everything from it. Its
|
|
7
|
+
* stylesheet, `ckeditor5-elements/index.css`, has the styles of all of them.
|
|
8
|
+
*
|
|
9
|
+
* @module ckeditor5-elements
|
|
10
|
+
*/
|
|
11
|
+
export * from 'ckeditor5-elements-core';
|
|
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';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CKEditor 5 Elements: commands that act on an element and their buttons, the element menu, the element context menu,
|
|
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.
|
|
5
|
+
*
|
|
6
|
+
* This package brings them all, as `ckeditor5` does for CKEditor: install it, and import everything from it. Its
|
|
7
|
+
* stylesheet, `ckeditor5-elements/index.css`, has the styles of all of them.
|
|
8
|
+
*
|
|
9
|
+
* @module ckeditor5-elements
|
|
10
|
+
*/
|
|
11
|
+
export * from 'ckeditor5-elements-core';
|
|
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';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,6 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ckeditor5-elements",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
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
|
+
"keywords": [
|
|
6
|
+
"ckeditor",
|
|
7
|
+
"ckeditor5",
|
|
8
|
+
"ckeditor 5",
|
|
9
|
+
"ckeditor5-feature",
|
|
10
|
+
"ckeditor5-plugin"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "Ivan Kildyushov",
|
|
14
|
+
"homepage": "https://ivankild.github.io/ckeditor5-elements/",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/ivankild/ckeditor5-elements.git",
|
|
18
|
+
"directory": "packages/ckeditor5-elements"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/ivankild/ckeditor5-elements/issues"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./index.css": "./dist/index.css",
|
|
32
|
+
"./validate-schema": {
|
|
33
|
+
"types": "./dist/validateSchema.d.ts",
|
|
34
|
+
"import": "./dist/validateSchema.js"
|
|
35
|
+
},
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"src",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
43
|
+
"sideEffects": [
|
|
44
|
+
"*.css"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
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"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"ckeditor5": "^49.0.0"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsc --build && node ../../scripts/buildUmbrellaStyles.js"
|
|
60
|
+
}
|
|
6
61
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CKEditor 5 Elements: commands that act on an element and their buttons, the element menu, the element context menu,
|
|
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.
|
|
5
|
+
*
|
|
6
|
+
* This package brings them all, as `ckeditor5` does for CKEditor: install it, and import everything from it. Its
|
|
7
|
+
* stylesheet, `ckeditor5-elements/index.css`, has the styles of all of them.
|
|
8
|
+
*
|
|
9
|
+
* @module ckeditor5-elements
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export * from 'ckeditor5-elements-core';
|
|
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';
|