@ckeditor/ckeditor5-fullscreen 45.1.0-alpha.7 → 45.2.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/build/fullscreen.js +1 -1
- package/dist/index-editor.css +40 -19
- package/dist/index.css +50 -21
- package/dist/index.css.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/handlers/abstracteditorhandler.js +13 -3
- package/theme/fullscreen.css +51 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-fullscreen",
|
|
3
|
-
"version": "45.
|
|
3
|
+
"version": "45.2.0-alpha.0",
|
|
4
4
|
"description": "Fullscreen mode feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-core": "45.
|
|
17
|
-
"@ckeditor/ckeditor5-editor-classic": "45.
|
|
18
|
-
"@ckeditor/ckeditor5-editor-decoupled": "45.
|
|
19
|
-
"@ckeditor/ckeditor5-icons": "45.
|
|
20
|
-
"@ckeditor/ckeditor5-ui": "45.
|
|
21
|
-
"@ckeditor/ckeditor5-utils": "45.
|
|
22
|
-
"ckeditor5": "45.
|
|
16
|
+
"@ckeditor/ckeditor5-core": "45.2.0-alpha.0",
|
|
17
|
+
"@ckeditor/ckeditor5-editor-classic": "45.2.0-alpha.0",
|
|
18
|
+
"@ckeditor/ckeditor5-editor-decoupled": "45.2.0-alpha.0",
|
|
19
|
+
"@ckeditor/ckeditor5-icons": "45.2.0-alpha.0",
|
|
20
|
+
"@ckeditor/ckeditor5-ui": "45.2.0-alpha.0",
|
|
21
|
+
"@ckeditor/ckeditor5-utils": "45.2.0-alpha.0",
|
|
22
|
+
"ckeditor5": "45.2.0-alpha.0"
|
|
23
23
|
},
|
|
24
24
|
"author": "CKSource (http://cksource.com/)",
|
|
25
25
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -175,9 +175,7 @@ export default class AbstractEditorHandler {
|
|
|
175
175
|
<div class="ck ck-fullscreen__toolbar" data-ck-fullscreen="toolbar"></div>
|
|
176
176
|
</div>
|
|
177
177
|
<div class="ck ck-fullscreen__editable-wrapper">
|
|
178
|
-
<div class="ck ck-fullscreen__sidebar ck-fullscreen__left-sidebar" data-ck-fullscreen="left-sidebar">
|
|
179
|
-
<div class="ck ck-fullscreen__left-sidebar--sticky" data-ck-fullscreen="left-sidebar-sticky"></div>
|
|
180
|
-
</div>
|
|
178
|
+
<div class="ck ck-fullscreen__sidebar ck-fullscreen__left-sidebar" data-ck-fullscreen="left-sidebar"></div>
|
|
181
179
|
<div class="ck ck-fullscreen__editable" data-ck-fullscreen="editable">
|
|
182
180
|
<div class="ck ck-fullscreen__pagination-view" data-ck-fullscreen="pagination-view"></div>
|
|
183
181
|
</div>
|
|
@@ -372,6 +370,12 @@ export default class AbstractEditorHandler {
|
|
|
372
370
|
<div class="ck ck-fullscreen__presence-list" data-ck-fullscreen="presence-list"></div>
|
|
373
371
|
`;
|
|
374
372
|
presenceListElement.firstElementChild.innerText = t('Connected users');
|
|
373
|
+
if (!document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]')) {
|
|
374
|
+
document.querySelector('[data-ck-fullscreen="left-sidebar"]').appendChild(createElement(document, 'div', {
|
|
375
|
+
class: 'ck ck-fullscreen__left-sidebar-sticky',
|
|
376
|
+
'data-ck-fullscreen': 'left-sidebar-sticky'
|
|
377
|
+
}));
|
|
378
|
+
}
|
|
375
379
|
document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(presenceListElement);
|
|
376
380
|
const presenceListUI = this._editor.plugins.get('PresenceListUI');
|
|
377
381
|
this.moveToFullscreen(presenceListUI.view.element, 'presence-list');
|
|
@@ -396,6 +400,12 @@ export default class AbstractEditorHandler {
|
|
|
396
400
|
documentOutlineBodyWrapper.innerHTML = `
|
|
397
401
|
<div class="ck ck-fullscreen__document-outline" data-ck-fullscreen="document-outline"></div>
|
|
398
402
|
`;
|
|
403
|
+
if (!document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]')) {
|
|
404
|
+
document.querySelector('[data-ck-fullscreen="left-sidebar"]').appendChild(createElement(document, 'div', {
|
|
405
|
+
class: 'ck ck-fullscreen__left-sidebar-sticky',
|
|
406
|
+
'data-ck-fullscreen': 'left-sidebar-sticky'
|
|
407
|
+
}));
|
|
408
|
+
}
|
|
399
409
|
document.querySelector('[data-ck-fullscreen="left-sidebar"]').appendChild(documentOutlineBodyWrapper);
|
|
400
410
|
document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(documentOutlineHeaderElement);
|
|
401
411
|
const documentOutlineUI = this._editor.plugins.get('DocumentOutlineUI');
|
package/theme/fullscreen.css
CHANGED
|
@@ -74,12 +74,25 @@ Fullscreen layout:
|
|
|
74
74
|
/* If the fullscreen container is not directly in the body, we need to make sure it's positioned absolutely. */
|
|
75
75
|
:not(body> .ck-fullscreen__main-wrapper).ck-fullscreen__main-wrapper {
|
|
76
76
|
position: absolute;
|
|
77
|
+
|
|
78
|
+
& .ck-fullscreen__top-wrapper {
|
|
79
|
+
border-top: 1px solid var(--ck-color-base-border);
|
|
80
|
+
border-left: 1px solid var(--ck-color-base-border);
|
|
81
|
+
border-right: 1px solid var(--ck-color-base-border);
|
|
82
|
+
border-radius: var(--ck-border-radius) 0;
|
|
83
|
+
}
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
.ck-fullscreen__menu-bar .ck.ck-menu-bar {
|
|
80
87
|
border: none;
|
|
81
88
|
}
|
|
82
89
|
|
|
90
|
+
.ck.ck-fullscreen__toolbar .ck-toolbar {
|
|
91
|
+
border-left: 0;
|
|
92
|
+
border-right: 0;
|
|
93
|
+
border-radius: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
83
96
|
.ck-fullscreen__main-wrapper .ck-fullscreen__editable-wrapper {
|
|
84
97
|
--ck-fullscreen-editor-top-margin: 28px;
|
|
85
98
|
--ck-fullscreen-editor-bottom-margin: 28px;
|
|
@@ -89,17 +102,6 @@ Fullscreen layout:
|
|
|
89
102
|
max-height: 100%;
|
|
90
103
|
}
|
|
91
104
|
|
|
92
|
-
.ck-fullscreen__sidebar {
|
|
93
|
-
width: 300px;
|
|
94
|
-
margin-top: var(--ck-fullscreen-editor-top-margin);
|
|
95
|
-
margin-left: 10px;
|
|
96
|
-
flex-shrink: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ck-fullscreen__sidebar[data-ck-fullscreen="right-sidebar"] {
|
|
100
|
-
margin-right: auto;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
105
|
.ck-fullscreen__main-wrapper .ck-fullscreen__editable {
|
|
104
106
|
margin-top: var(--ck-fullscreen-editor-top-margin);
|
|
105
107
|
height: 100%;
|
|
@@ -114,11 +116,14 @@ Fullscreen layout:
|
|
|
114
116
|
|
|
115
117
|
.ck-fullscreen__main-wrapper .ck-fullscreen__editable .ck.ck-editor__editable:not(.ck-editor__nested-editable) {
|
|
116
118
|
box-sizing: border-box;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
/* Make sure the border is taken into account. */
|
|
120
|
+
width: calc(210mm + 2px);
|
|
121
|
+
/* Make sure the border is taken into account. */
|
|
122
|
+
max-width: calc(210mm + 2px);
|
|
119
123
|
min-height: 297mm;
|
|
120
124
|
height: fit-content;
|
|
121
|
-
|
|
125
|
+
/* Reset margins that may be present on editable. We add them in other places. */
|
|
126
|
+
margin: 0;
|
|
122
127
|
padding: 20mm 12mm;
|
|
123
128
|
border: 1px var(--ck-color-base-border) solid;
|
|
124
129
|
background: hsl(0, 0%, 100%);
|
|
@@ -129,6 +134,12 @@ Fullscreen layout:
|
|
|
129
134
|
width: calc(210mm + 2px);
|
|
130
135
|
}
|
|
131
136
|
|
|
137
|
+
.ck-fullscreen__sidebar {
|
|
138
|
+
width: 300px;
|
|
139
|
+
margin-top: var(--ck-fullscreen-editor-top-margin);
|
|
140
|
+
margin-left: 10px;
|
|
141
|
+
}
|
|
142
|
+
|
|
132
143
|
.ck-fullscreen__left-sidebar {
|
|
133
144
|
font-family: Helvetica, Arial, sans-serif;
|
|
134
145
|
--ck-user-avatar-size: 28px;
|
|
@@ -141,16 +152,19 @@ Fullscreen layout:
|
|
|
141
152
|
box-sizing: border-box;
|
|
142
153
|
display: flex;
|
|
143
154
|
flex-direction: column;
|
|
155
|
+
|
|
156
|
+
> :first-child {
|
|
157
|
+
/* Set minimal width if there is any item in the sidebar. */
|
|
158
|
+
min-width: 300px;
|
|
159
|
+
/* We have to use padding-top instead of margin-top because margin is scrollable. */
|
|
160
|
+
padding-top: var(--ck-fullscreen-editor-top-margin);
|
|
161
|
+
}
|
|
144
162
|
}
|
|
145
163
|
|
|
146
164
|
.ck-fullscreen__left-sidebar .ck.ck-presence-list--collapsed {
|
|
147
165
|
--ck-user-avatar-size: 32px;
|
|
148
166
|
}
|
|
149
167
|
|
|
150
|
-
.ck-fullscreen__left-sidebar> :first-child {
|
|
151
|
-
padding-top: var(--ck-fullscreen-editor-top-margin);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
168
|
.ck-fullscreen__left-sidebar .ck-user {
|
|
155
169
|
font-size: 0.85em;
|
|
156
170
|
}
|
|
@@ -162,10 +176,15 @@ Fullscreen layout:
|
|
|
162
176
|
.ck-fullscreen__left-sidebar-item {
|
|
163
177
|
padding: var(--ck-spacing-medium);
|
|
164
178
|
margin-bottom: var(--ck-spacing-medium);
|
|
165
|
-
}
|
|
166
179
|
|
|
167
|
-
.
|
|
168
|
-
|
|
180
|
+
/* First header should not have top padding. */
|
|
181
|
+
&:first-child {
|
|
182
|
+
padding-top: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:last-child {
|
|
186
|
+
margin-bottom: 0;
|
|
187
|
+
}
|
|
169
188
|
}
|
|
170
189
|
|
|
171
190
|
.ck-fullscreen__left-sidebar-header {
|
|
@@ -182,7 +201,7 @@ Fullscreen layout:
|
|
|
182
201
|
position: sticky;
|
|
183
202
|
top: 0;
|
|
184
203
|
|
|
185
|
-
|
|
204
|
+
& > :first-child {
|
|
186
205
|
padding-top: 0;
|
|
187
206
|
}
|
|
188
207
|
}
|
|
@@ -205,3 +224,13 @@ Fullscreen layout:
|
|
|
205
224
|
padding-top: 0;
|
|
206
225
|
overflow-y: auto;
|
|
207
226
|
}
|
|
227
|
+
|
|
228
|
+
.ck-fullscreen__sidebar.ck-fullscreen__right-sidebar {
|
|
229
|
+
margin-top: var(--ck-fullscreen-editor-top-margin);
|
|
230
|
+
margin-right: auto;
|
|
231
|
+
|
|
232
|
+
&> :first-child {
|
|
233
|
+
/* Set minimal width if there is any item in the sidebar. */
|
|
234
|
+
min-width: 300px;
|
|
235
|
+
}
|
|
236
|
+
}
|