@ckeditor/ckeditor5-enter 41.1.0 → 41.3.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/dist/content-index.css +4 -0
- package/dist/editor-index.css +4 -0
- package/dist/index.css +4 -0
- package/dist/index.js +427 -0
- package/dist/index.js.map +1 -0
- package/dist/types/augmentation.d.ts +15 -0
- package/dist/types/enter.d.ts +22 -0
- package/dist/types/entercommand.d.ts +52 -0
- package/dist/types/enterobserver.d.ts +44 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/shiftenter.d.ts +19 -0
- package/dist/types/shiftentercommand.d.ts +34 -0
- package/dist/types/utils.d.ts +18 -0
- package/lang/contexts.json +4 -0
- package/lang/translations/ar.po +26 -0
- package/lang/translations/bg.po +26 -0
- package/lang/translations/bn.po +26 -0
- package/lang/translations/ca.po +26 -0
- package/lang/translations/cs.po +26 -0
- package/lang/translations/da.po +26 -0
- package/lang/translations/de.po +26 -0
- package/lang/translations/el.po +26 -0
- package/lang/translations/en.po +26 -0
- package/lang/translations/es.po +26 -0
- package/lang/translations/et.po +26 -0
- package/lang/translations/fi.po +26 -0
- package/lang/translations/fr.po +26 -0
- package/lang/translations/he.po +26 -0
- package/lang/translations/hi.po +26 -0
- package/lang/translations/hr.po +26 -0
- package/lang/translations/hu.po +26 -0
- package/lang/translations/id.po +26 -0
- package/lang/translations/it.po +26 -0
- package/lang/translations/ja.po +26 -0
- package/lang/translations/ko.po +26 -0
- package/lang/translations/lt.po +26 -0
- package/lang/translations/lv.po +26 -0
- package/lang/translations/ms.po +26 -0
- package/lang/translations/nl.po +26 -0
- package/lang/translations/no.po +26 -0
- package/lang/translations/pl.po +26 -0
- package/lang/translations/pt-br.po +26 -0
- package/lang/translations/pt.po +26 -0
- package/lang/translations/ro.po +26 -0
- package/lang/translations/ru.po +26 -0
- package/lang/translations/sk.po +26 -0
- package/lang/translations/sr.po +26 -0
- package/lang/translations/sv.po +26 -0
- package/lang/translations/th.po +26 -0
- package/lang/translations/tr.po +26 -0
- package/lang/translations/uk.po +26 -0
- package/lang/translations/vi.po +26 -0
- package/lang/translations/zh-cn.po +26 -0
- package/lang/translations/zh.po +26 -0
- package/package.json +5 -4
- package/src/enter.js +10 -0
- package/src/shiftenter.js +10 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Chinese (China) (https://app.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
|
|
16
|
+
"Language: zh_CN\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
|
+
|
|
20
|
+
msgctxt "Keystroke description for assistive technologies: keystroke for inserting a soft break."
|
|
21
|
+
msgid "Insert a soft break (a <code><br></code> element)"
|
|
22
|
+
msgstr "插入软换行(一个<code><br></code> 元素)"
|
|
23
|
+
|
|
24
|
+
msgctxt "Keystroke description for assistive technologies: keystroke for inserting a hard break."
|
|
25
|
+
msgid "Insert a hard break (a new paragraph)"
|
|
26
|
+
msgstr "插入硬换行(新段落)"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Chinese (Taiwan) (https://app.transifex.com/ckeditor/teams/11143/zh_TW/)\n"
|
|
16
|
+
"Language: zh_TW\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
|
+
|
|
20
|
+
msgctxt "Keystroke description for assistive technologies: keystroke for inserting a soft break."
|
|
21
|
+
msgid "Insert a soft break (a <code><br></code> element)"
|
|
22
|
+
msgstr "插入非強制斷行(<code><br></code> 元件)"
|
|
23
|
+
|
|
24
|
+
msgctxt "Keystroke description for assistive technologies: keystroke for inserting a hard break."
|
|
25
|
+
msgid "Insert a hard break (a new paragraph)"
|
|
26
|
+
msgstr "插入強制斷行(新段落)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-enter",
|
|
3
|
-
"version": "41.
|
|
3
|
+
"version": "41.3.0-alpha.0",
|
|
4
4
|
"description": "Enter feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-core": "41.
|
|
17
|
-
"@ckeditor/ckeditor5-engine": "41.
|
|
18
|
-
"@ckeditor/ckeditor5-utils": "41.
|
|
16
|
+
"@ckeditor/ckeditor5-core": "41.3.0-alpha.0",
|
|
17
|
+
"@ckeditor/ckeditor5-engine": "41.3.0-alpha.0",
|
|
18
|
+
"@ckeditor/ckeditor5-utils": "41.3.0-alpha.0"
|
|
19
19
|
},
|
|
20
20
|
"author": "CKSource (http://cksource.com/)",
|
|
21
21
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"directory": "packages/ckeditor5-enter"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
|
+
"dist",
|
|
30
31
|
"lang",
|
|
31
32
|
"src/**/*.js",
|
|
32
33
|
"src/**/*.d.ts",
|
package/src/enter.js
CHANGED
|
@@ -26,6 +26,7 @@ export default class Enter extends Plugin {
|
|
|
26
26
|
const editor = this.editor;
|
|
27
27
|
const view = editor.editing.view;
|
|
28
28
|
const viewDocument = view.document;
|
|
29
|
+
const t = this.editor.t;
|
|
29
30
|
view.addObserver(EnterObserver);
|
|
30
31
|
editor.commands.add('enter', new EnterCommand(editor));
|
|
31
32
|
this.listenTo(viewDocument, 'enter', (evt, data) => {
|
|
@@ -41,5 +42,14 @@ export default class Enter extends Plugin {
|
|
|
41
42
|
editor.execute('enter');
|
|
42
43
|
view.scrollToTheSelection();
|
|
43
44
|
}, { priority: 'low' });
|
|
45
|
+
// Add the information about the keystroke to the accessibility database.
|
|
46
|
+
editor.accessibility.addKeystrokeInfos({
|
|
47
|
+
keystrokes: [
|
|
48
|
+
{
|
|
49
|
+
label: t('Insert a hard break (a new paragraph)'),
|
|
50
|
+
keystroke: 'Enter'
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
});
|
|
44
54
|
}
|
|
45
55
|
}
|
package/src/shiftenter.js
CHANGED
|
@@ -28,6 +28,7 @@ export default class ShiftEnter extends Plugin {
|
|
|
28
28
|
const conversion = editor.conversion;
|
|
29
29
|
const view = editor.editing.view;
|
|
30
30
|
const viewDocument = view.document;
|
|
31
|
+
const t = this.editor.t;
|
|
31
32
|
// Configure the schema.
|
|
32
33
|
schema.register('softBreak', {
|
|
33
34
|
allowWhere: '$text',
|
|
@@ -59,5 +60,14 @@ export default class ShiftEnter extends Plugin {
|
|
|
59
60
|
editor.execute('shiftEnter');
|
|
60
61
|
view.scrollToTheSelection();
|
|
61
62
|
}, { priority: 'low' });
|
|
63
|
+
// Add the information about the keystroke to the accessibility database.
|
|
64
|
+
editor.accessibility.addKeystrokeInfos({
|
|
65
|
+
keystrokes: [
|
|
66
|
+
{
|
|
67
|
+
label: t('Insert a soft break (a <code><br></code> element)'),
|
|
68
|
+
keystroke: 'Shift+Enter'
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
});
|
|
62
72
|
}
|
|
63
73
|
}
|