@ckeditor/ckeditor5-fullscreen 45.0.0-alpha.8 → 45.0.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.js +19 -8
- package/dist/index.js.map +1 -1
- package/lang/contexts.json +3 -1
- package/package.json +13 -13
- package/src/fullscreenediting.js +5 -3
- package/src/fullscreenui.js +9 -1
- package/src/handlers/abstracteditorhandler.js +6 -4
package/lang/contexts.json
CHANGED
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
"Enter fullscreen mode": "Label for a toolbar button that enters the fullscreen when pressed",
|
|
3
3
|
"Leave fullscreen mode": "Label for a toolbar button that leaves the fullscreen when pressed",
|
|
4
4
|
"Fullscreen mode": "Label for a menu bar button that toggles fullscreen mode",
|
|
5
|
-
"Toggle fullscreen mode": "Keystroke description for assistive technologies: keystroke for toggling a fullscreen mode."
|
|
5
|
+
"Toggle fullscreen mode": "Keystroke description for assistive technologies: keystroke for toggling a fullscreen mode.",
|
|
6
|
+
"Document outline": "Label for a sidebar header that contains a document outline",
|
|
7
|
+
"Connected users": "Label for a sidebar header that contains a list of connected users"
|
|
6
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-fullscreen",
|
|
3
|
-
"version": "45.0.0
|
|
3
|
+
"version": "45.0.0",
|
|
4
4
|
"description": "Fullscreen mode feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-comments": "45.0.0
|
|
17
|
-
"@ckeditor/ckeditor5-core": "45.0.0
|
|
18
|
-
"@ckeditor/ckeditor5-document-outline": "45.0.0
|
|
19
|
-
"@ckeditor/ckeditor5-editor-classic": "45.0.0
|
|
20
|
-
"@ckeditor/ckeditor5-editor-decoupled": "45.0.0
|
|
21
|
-
"@ckeditor/ckeditor5-icons": "45.0.0
|
|
22
|
-
"@ckeditor/ckeditor5-pagination": "45.0.0
|
|
23
|
-
"@ckeditor/ckeditor5-real-time-collaboration": "45.0.0
|
|
24
|
-
"@ckeditor/ckeditor5-revision-history": "45.0.0
|
|
25
|
-
"@ckeditor/ckeditor5-ui": "45.0.0
|
|
26
|
-
"@ckeditor/ckeditor5-utils": "45.0.0
|
|
27
|
-
"ckeditor5": "45.0.0
|
|
16
|
+
"@ckeditor/ckeditor5-comments": "45.0.0",
|
|
17
|
+
"@ckeditor/ckeditor5-core": "45.0.0",
|
|
18
|
+
"@ckeditor/ckeditor5-document-outline": "45.0.0",
|
|
19
|
+
"@ckeditor/ckeditor5-editor-classic": "45.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-editor-decoupled": "45.0.0",
|
|
21
|
+
"@ckeditor/ckeditor5-icons": "45.0.0",
|
|
22
|
+
"@ckeditor/ckeditor5-pagination": "45.0.0",
|
|
23
|
+
"@ckeditor/ckeditor5-real-time-collaboration": "45.0.0",
|
|
24
|
+
"@ckeditor/ckeditor5-revision-history": "45.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-ui": "45.0.0",
|
|
26
|
+
"@ckeditor/ckeditor5-utils": "45.0.0",
|
|
27
|
+
"ckeditor5": "45.0.0"
|
|
28
28
|
},
|
|
29
29
|
"author": "CKSource (http://cksource.com/)",
|
|
30
30
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/src/fullscreenediting.js
CHANGED
|
@@ -43,14 +43,16 @@ export default class FullscreenEditing extends Plugin {
|
|
|
43
43
|
// Set the Ctrl+Shift+F keystroke.
|
|
44
44
|
this.editor.keystrokes.set('Ctrl+Shift+F', (evt, cancel) => {
|
|
45
45
|
this.editor.execute('toggleFullscreen');
|
|
46
|
-
// On non-Chromium browsers, the editor view
|
|
47
|
-
// even though the `document.activeElement` is changed. Hence we need to blur
|
|
46
|
+
// On non-Chromium browsers, the editor view and toolbar are not blurred properly after moving the editable,
|
|
47
|
+
// even though the `document.activeElement` is changed. Hence we need to blur them manually.
|
|
48
48
|
// Fixes https://github.com/ckeditor/ckeditor5/issues/18250 and https://github.com/ckeditor/ckeditor5/issues/18247.
|
|
49
49
|
if (!env.isBlink) {
|
|
50
50
|
this.editor.editing.view.document.isFocused = false;
|
|
51
|
+
this.editor.ui.view.toolbar.focusTracker.focusedElement = null;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
+
// The order of scroll and focus is not important here.
|
|
53
54
|
this.editor.editing.view.scrollToTheSelection();
|
|
55
|
+
this.editor.editing.view.focus();
|
|
54
56
|
cancel();
|
|
55
57
|
});
|
|
56
58
|
// Add the information about the keystroke to the accessibility database.
|
package/src/fullscreenui.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import { ButtonView, MenuBarMenuListItemButtonView } from 'ckeditor5/src/ui.js';
|
|
10
10
|
import { IconFullscreenEnter, IconFullscreenLeave } from 'ckeditor5/src/icons.js';
|
|
11
|
+
import { env } from 'ckeditor5/src/utils.js';
|
|
11
12
|
import FullscreenEditing from './fullscreenediting.js';
|
|
12
13
|
import '../theme/fullscreen.css';
|
|
13
14
|
const COMMAND_NAME = 'toggleFullscreen';
|
|
@@ -69,8 +70,15 @@ export default class FullscreenUI extends Plugin {
|
|
|
69
70
|
}
|
|
70
71
|
this.listenTo(view, 'execute', () => {
|
|
71
72
|
editor.execute(COMMAND_NAME);
|
|
72
|
-
|
|
73
|
+
// On non-Chromium browsers, toolbar is not blurred properly after moving the editable,
|
|
74
|
+
// even though the `document.activeElement` is changed. Hence we need to blur the view manually.
|
|
75
|
+
// Fixes https://github.com/ckeditor/ckeditor5/issues/18250 and https://github.com/ckeditor/ckeditor5/issues/18247.
|
|
76
|
+
if (!env.isBlink) {
|
|
77
|
+
this.editor.ui.view.toolbar.focusTracker.focusedElement = null;
|
|
78
|
+
}
|
|
79
|
+
// The order of scroll and focus is not important here.
|
|
73
80
|
editor.editing.view.scrollToTheSelection();
|
|
81
|
+
editor.editing.view.focus();
|
|
74
82
|
});
|
|
75
83
|
return view;
|
|
76
84
|
}
|
|
@@ -300,13 +300,15 @@ export default class AbstractEditorHandler {
|
|
|
300
300
|
// Code coverage is provided in the commercial package repository as integration unit tests.
|
|
301
301
|
/* istanbul ignore next -- @preserve */
|
|
302
302
|
_generatePresenceListContainer() {
|
|
303
|
+
const t = this._editor.t;
|
|
303
304
|
const presenceListElement = createElement(document, 'div', {
|
|
304
305
|
class: 'ck ck-fullscreen__left-sidebar-item'
|
|
305
306
|
});
|
|
306
307
|
presenceListElement.innerHTML = `
|
|
307
|
-
<div class="ck ck-fullscreen__left-sidebar-header"
|
|
308
|
+
<div class="ck ck-fullscreen__left-sidebar-header"></div>
|
|
308
309
|
<div class="ck ck-fullscreen__presence-list" data-ck-fullscreen="presence-list"></div>
|
|
309
310
|
`;
|
|
311
|
+
presenceListElement.firstElementChild.innerText = t('Connected users');
|
|
310
312
|
document.querySelector('[data-ck-fullscreen="left-sidebar-sticky"]').appendChild(presenceListElement);
|
|
311
313
|
const presenceListUI = this._editor.plugins.get('PresenceListUI');
|
|
312
314
|
this.moveToFullscreen(presenceListUI.view.element, 'presence-list');
|
|
@@ -317,14 +319,14 @@ export default class AbstractEditorHandler {
|
|
|
317
319
|
// Code coverage is provided in the commercial package repository as integration unit tests.
|
|
318
320
|
/* istanbul ignore next -- @preserve */
|
|
319
321
|
_generateDocumentOutlineContainer() {
|
|
322
|
+
const t = this._editor.t;
|
|
320
323
|
const documentOutlineHeaderElement = createElement(document, 'div', {
|
|
321
324
|
class: 'ck-fullscreen__left-sidebar-item ck-fullscreen__left-sidebar-item--no-margin'
|
|
322
325
|
});
|
|
323
326
|
documentOutlineHeaderElement.innerHTML = `
|
|
324
|
-
<div class="ck ck-fullscreen__left-sidebar-header ck-fullscreen__document-outline-header">
|
|
325
|
-
Document outline
|
|
326
|
-
</div>
|
|
327
|
+
<div class="ck ck-fullscreen__left-sidebar-header ck-fullscreen__document-outline-header"></div>
|
|
327
328
|
`;
|
|
329
|
+
documentOutlineHeaderElement.firstElementChild.innerText = t('Document outline');
|
|
328
330
|
const documentOutlineBodyWrapper = createElement(document, 'div', {
|
|
329
331
|
class: 'ck ck-fullscreen__left-sidebar-item ck-fullscreen__document-outline-wrapper'
|
|
330
332
|
});
|