@ckeditor/ckeditor5-core 47.6.1 → 48.0.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/LICENSE.md +1 -1
- package/{src → dist}/editor/editorconfig.d.ts +295 -20
- package/dist/editor/utils/normalizerootsconfig.d.ts +50 -0
- package/dist/index-content.css +10 -10
- package/dist/index-editor.css +5 -5
- package/dist/index.css +10 -16
- package/dist/index.css.map +1 -1
- package/{src → dist}/index.d.ts +2 -1
- package/dist/index.js +161 -6
- package/dist/index.js.map +1 -1
- package/package.json +23 -43
- package/lang/contexts.json +0 -38
- package/lang/translations/af.po +0 -156
- package/lang/translations/ar.po +0 -156
- package/lang/translations/ast.po +0 -156
- package/lang/translations/az.po +0 -156
- package/lang/translations/be.po +0 -156
- package/lang/translations/bg.po +0 -156
- package/lang/translations/bn.po +0 -156
- package/lang/translations/bs.po +0 -156
- package/lang/translations/ca.po +0 -156
- package/lang/translations/cs.po +0 -156
- package/lang/translations/da.po +0 -156
- package/lang/translations/de-ch.po +0 -156
- package/lang/translations/de.po +0 -156
- package/lang/translations/el.po +0 -156
- package/lang/translations/en-au.po +0 -156
- package/lang/translations/en-gb.po +0 -156
- package/lang/translations/en.po +0 -156
- package/lang/translations/eo.po +0 -156
- package/lang/translations/es-co.po +0 -156
- package/lang/translations/es.po +0 -156
- package/lang/translations/et.po +0 -156
- package/lang/translations/eu.po +0 -156
- package/lang/translations/fa.po +0 -156
- package/lang/translations/fi.po +0 -156
- package/lang/translations/fr.po +0 -156
- package/lang/translations/gl.po +0 -156
- package/lang/translations/gu.po +0 -156
- package/lang/translations/he.po +0 -156
- package/lang/translations/hi.po +0 -156
- package/lang/translations/hr.po +0 -156
- package/lang/translations/hu.po +0 -156
- package/lang/translations/hy.po +0 -156
- package/lang/translations/id.po +0 -156
- package/lang/translations/it.po +0 -156
- package/lang/translations/ja.po +0 -156
- package/lang/translations/jv.po +0 -156
- package/lang/translations/kk.po +0 -156
- package/lang/translations/km.po +0 -156
- package/lang/translations/kn.po +0 -156
- package/lang/translations/ko.po +0 -156
- package/lang/translations/ku.po +0 -156
- package/lang/translations/lt.po +0 -156
- package/lang/translations/lv.po +0 -156
- package/lang/translations/ms.po +0 -156
- package/lang/translations/nb.po +0 -156
- package/lang/translations/ne.po +0 -156
- package/lang/translations/nl.po +0 -156
- package/lang/translations/no.po +0 -156
- package/lang/translations/oc.po +0 -156
- package/lang/translations/pl.po +0 -156
- package/lang/translations/pt-br.po +0 -156
- package/lang/translations/pt.po +0 -156
- package/lang/translations/ro.po +0 -156
- package/lang/translations/ru.po +0 -156
- package/lang/translations/si.po +0 -156
- package/lang/translations/sk.po +0 -156
- package/lang/translations/sl.po +0 -156
- package/lang/translations/sq.po +0 -156
- package/lang/translations/sr-latn.po +0 -156
- package/lang/translations/sr.po +0 -156
- package/lang/translations/sv.po +0 -156
- package/lang/translations/th.po +0 -156
- package/lang/translations/ti.po +0 -156
- package/lang/translations/tk.po +0 -156
- package/lang/translations/tr.po +0 -156
- package/lang/translations/tt.po +0 -156
- package/lang/translations/ug.po +0 -156
- package/lang/translations/uk.po +0 -156
- package/lang/translations/ur.po +0 -156
- package/lang/translations/uz.po +0 -156
- package/lang/translations/vi.po +0 -156
- package/lang/translations/zh-cn.po +0 -156
- package/lang/translations/zh.po +0 -156
- package/src/accessibility.js +0 -332
- package/src/augmentation.js +0 -5
- package/src/command.js +0 -221
- package/src/commandcollection.js +0 -87
- package/src/context.js +0 -315
- package/src/contextplugin.js +0 -59
- package/src/editingkeystrokehandler.js +0 -61
- package/src/editor/editor.js +0 -1010
- package/src/editor/editorconfig.js +0 -5
- package/src/editor/utils/attachtoform.js +0 -57
- package/src/editor/utils/editorusagedata.js +0 -127
- package/src/editor/utils/elementapimixin.js +0 -42
- package/src/editor/utils/securesourceelement.js +0 -35
- package/src/index.js +0 -22
- package/src/multicommand.js +0 -79
- package/src/pendingactions.js +0 -127
- package/src/plugin.js +0 -132
- package/src/plugincollection.js +0 -506
- package/src/typings.js +0 -5
- package/theme/core.css +0 -21
- /package/{src → dist}/accessibility.d.ts +0 -0
- /package/{src → dist}/augmentation.d.ts +0 -0
- /package/{src → dist}/command.d.ts +0 -0
- /package/{src → dist}/commandcollection.d.ts +0 -0
- /package/{src → dist}/context.d.ts +0 -0
- /package/{src → dist}/contextplugin.d.ts +0 -0
- /package/{src → dist}/editingkeystrokehandler.d.ts +0 -0
- /package/{src → dist}/editor/editor.d.ts +0 -0
- /package/{src → dist}/editor/utils/attachtoform.d.ts +0 -0
- /package/{src → dist}/editor/utils/editorusagedata.d.ts +0 -0
- /package/{src → dist}/editor/utils/elementapimixin.d.ts +0 -0
- /package/{src → dist}/editor/utils/securesourceelement.d.ts +0 -0
- /package/{src → dist}/multicommand.d.ts +0 -0
- /package/{src → dist}/pendingactions.d.ts +0 -0
- /package/{src → dist}/plugin.d.ts +0 -0
- /package/{src → dist}/plugincollection.d.ts +0 -0
- /package/{src → dist}/typings.d.ts +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module core/editingkeystrokehandler
|
|
7
|
-
*/
|
|
8
|
-
import { KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
|
|
9
|
-
/**
|
|
10
|
-
* A keystroke handler for editor editing. Its instance is available
|
|
11
|
-
* in {@link module:core/editor/editor~Editor#keystrokes} so plugins
|
|
12
|
-
* can register their keystrokes.
|
|
13
|
-
*
|
|
14
|
-
* E.g. an undo plugin would do this:
|
|
15
|
-
*
|
|
16
|
-
* ```ts
|
|
17
|
-
* editor.keystrokes.set( 'Ctrl+Z', 'undo' );
|
|
18
|
-
* editor.keystrokes.set( 'Ctrl+Shift+Z', 'redo' );
|
|
19
|
-
* editor.keystrokes.set( 'Ctrl+Y', 'redo' );
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export class EditingKeystrokeHandler extends KeystrokeHandler {
|
|
23
|
-
/**
|
|
24
|
-
* The editor instance.
|
|
25
|
-
*/
|
|
26
|
-
editor;
|
|
27
|
-
/**
|
|
28
|
-
* Creates an instance of the keystroke handler.
|
|
29
|
-
*/
|
|
30
|
-
constructor(editor) {
|
|
31
|
-
super();
|
|
32
|
-
this.editor = editor;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Registers a handler for the specified keystroke.
|
|
36
|
-
*
|
|
37
|
-
* The handler can be specified as a command name or a callback.
|
|
38
|
-
*
|
|
39
|
-
* @param keystroke Keystroke defined in a format accepted by
|
|
40
|
-
* the {@link module:utils/keyboard~parseKeystroke} function.
|
|
41
|
-
* @param callback If a string is passed, then the keystroke will
|
|
42
|
-
* {@link module:core/editor/editor~Editor#execute execute a command}.
|
|
43
|
-
* If a function, then it will be called with the
|
|
44
|
-
* {@link module:engine/view/observer/keyobserver~ViewDocumentKeyEventData key event data} object and
|
|
45
|
-
* a `cancel()` helper to both `preventDefault()` and `stopPropagation()` of the event.
|
|
46
|
-
* @param options Additional options.
|
|
47
|
-
* @param options.priority The priority of the keystroke callback. The higher the priority value
|
|
48
|
-
* the sooner the callback will be executed. Keystrokes having the same priority
|
|
49
|
-
* are called in the order they were added.
|
|
50
|
-
*/
|
|
51
|
-
set(keystroke, callback, options = {}) {
|
|
52
|
-
if (typeof callback == 'string') {
|
|
53
|
-
const commandName = callback;
|
|
54
|
-
callback = (evtData, cancel) => {
|
|
55
|
-
this.editor.execute(commandName);
|
|
56
|
-
cancel();
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
super.set(keystroke, callback, options);
|
|
60
|
-
}
|
|
61
|
-
}
|