@ckeditor/ckeditor5-code-block 0.0.0-nightly-20260124.0 → 0.0.0-nightly-next-20260124.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/ckeditor5-metadata.json +1 -1
- package/{src → dist}/codeblock.d.ts +1 -1
- package/{src → dist}/codeblockcommand.d.ts +1 -1
- package/{src → dist}/codeblockediting.d.ts +2 -2
- package/{src → dist}/codeblockui.d.ts +1 -1
- package/{src → dist}/converters.d.ts +2 -2
- package/{src → dist}/indentcodeblockcommand.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/{src → dist}/outdentcodeblockcommand.d.ts +1 -1
- package/{src → dist}/utils.d.ts +3 -3
- package/package.json +25 -49
- package/build/code-block.js +0 -5
- package/build/translations/af.js +0 -1
- package/build/translations/ar.js +0 -1
- package/build/translations/ast.js +0 -1
- package/build/translations/az.js +0 -1
- package/build/translations/be.js +0 -1
- package/build/translations/bg.js +0 -1
- package/build/translations/bn.js +0 -1
- package/build/translations/bs.js +0 -1
- package/build/translations/ca.js +0 -1
- package/build/translations/cs.js +0 -1
- package/build/translations/da.js +0 -1
- package/build/translations/de-ch.js +0 -1
- package/build/translations/de.js +0 -1
- package/build/translations/el.js +0 -1
- package/build/translations/en-au.js +0 -1
- package/build/translations/en-gb.js +0 -1
- package/build/translations/eo.js +0 -1
- package/build/translations/es-co.js +0 -1
- package/build/translations/es.js +0 -1
- package/build/translations/et.js +0 -1
- package/build/translations/eu.js +0 -1
- package/build/translations/fa.js +0 -1
- package/build/translations/fi.js +0 -1
- package/build/translations/fr.js +0 -1
- package/build/translations/gl.js +0 -1
- package/build/translations/gu.js +0 -1
- package/build/translations/he.js +0 -1
- package/build/translations/hi.js +0 -1
- package/build/translations/hr.js +0 -1
- package/build/translations/hu.js +0 -1
- package/build/translations/hy.js +0 -1
- package/build/translations/id.js +0 -1
- package/build/translations/it.js +0 -1
- package/build/translations/ja.js +0 -1
- package/build/translations/jv.js +0 -1
- package/build/translations/kk.js +0 -1
- package/build/translations/km.js +0 -1
- package/build/translations/kn.js +0 -1
- package/build/translations/ko.js +0 -1
- package/build/translations/ku.js +0 -1
- package/build/translations/lt.js +0 -1
- package/build/translations/lv.js +0 -1
- package/build/translations/ms.js +0 -1
- package/build/translations/nb.js +0 -1
- package/build/translations/ne.js +0 -1
- package/build/translations/nl.js +0 -1
- package/build/translations/no.js +0 -1
- package/build/translations/oc.js +0 -1
- package/build/translations/pl.js +0 -1
- package/build/translations/pt-br.js +0 -1
- package/build/translations/pt.js +0 -1
- package/build/translations/ro.js +0 -1
- package/build/translations/ru.js +0 -1
- package/build/translations/si.js +0 -1
- package/build/translations/sk.js +0 -1
- package/build/translations/sl.js +0 -1
- package/build/translations/sq.js +0 -1
- package/build/translations/sr-latn.js +0 -1
- package/build/translations/sr.js +0 -1
- package/build/translations/sv.js +0 -1
- package/build/translations/th.js +0 -1
- package/build/translations/ti.js +0 -1
- package/build/translations/tk.js +0 -1
- package/build/translations/tr.js +0 -1
- package/build/translations/tt.js +0 -1
- package/build/translations/ug.js +0 -1
- package/build/translations/uk.js +0 -1
- package/build/translations/ur.js +0 -1
- package/build/translations/uz.js +0 -1
- package/build/translations/vi.js +0 -1
- package/build/translations/zh-cn.js +0 -1
- package/build/translations/zh.js +0 -1
- package/lang/contexts.json +0 -9
- package/lang/translations/af.po +0 -40
- package/lang/translations/ar.po +0 -40
- package/lang/translations/ast.po +0 -40
- package/lang/translations/az.po +0 -40
- package/lang/translations/be.po +0 -40
- package/lang/translations/bg.po +0 -40
- package/lang/translations/bn.po +0 -40
- package/lang/translations/bs.po +0 -40
- package/lang/translations/ca.po +0 -40
- package/lang/translations/cs.po +0 -40
- package/lang/translations/da.po +0 -40
- package/lang/translations/de-ch.po +0 -40
- package/lang/translations/de.po +0 -40
- package/lang/translations/el.po +0 -40
- package/lang/translations/en-au.po +0 -40
- package/lang/translations/en-gb.po +0 -40
- package/lang/translations/en.po +0 -40
- package/lang/translations/eo.po +0 -40
- package/lang/translations/es-co.po +0 -40
- package/lang/translations/es.po +0 -40
- package/lang/translations/et.po +0 -40
- package/lang/translations/eu.po +0 -40
- package/lang/translations/fa.po +0 -40
- package/lang/translations/fi.po +0 -40
- package/lang/translations/fr.po +0 -40
- package/lang/translations/gl.po +0 -40
- package/lang/translations/gu.po +0 -40
- package/lang/translations/he.po +0 -40
- package/lang/translations/hi.po +0 -40
- package/lang/translations/hr.po +0 -40
- package/lang/translations/hu.po +0 -40
- package/lang/translations/hy.po +0 -40
- package/lang/translations/id.po +0 -40
- package/lang/translations/it.po +0 -40
- package/lang/translations/ja.po +0 -40
- package/lang/translations/jv.po +0 -40
- package/lang/translations/kk.po +0 -40
- package/lang/translations/km.po +0 -40
- package/lang/translations/kn.po +0 -40
- package/lang/translations/ko.po +0 -40
- package/lang/translations/ku.po +0 -40
- package/lang/translations/lt.po +0 -40
- package/lang/translations/lv.po +0 -40
- package/lang/translations/ms.po +0 -40
- package/lang/translations/nb.po +0 -40
- package/lang/translations/ne.po +0 -40
- package/lang/translations/nl.po +0 -40
- package/lang/translations/no.po +0 -40
- package/lang/translations/oc.po +0 -40
- package/lang/translations/pl.po +0 -40
- package/lang/translations/pt-br.po +0 -40
- package/lang/translations/pt.po +0 -40
- package/lang/translations/ro.po +0 -40
- package/lang/translations/ru.po +0 -40
- package/lang/translations/si.po +0 -40
- package/lang/translations/sk.po +0 -40
- package/lang/translations/sl.po +0 -40
- package/lang/translations/sq.po +0 -40
- package/lang/translations/sr-latn.po +0 -40
- package/lang/translations/sr.po +0 -40
- package/lang/translations/sv.po +0 -40
- package/lang/translations/th.po +0 -40
- package/lang/translations/ti.po +0 -40
- package/lang/translations/tk.po +0 -40
- package/lang/translations/tr.po +0 -40
- package/lang/translations/tt.po +0 -40
- package/lang/translations/ug.po +0 -40
- package/lang/translations/uk.po +0 -40
- package/lang/translations/ur.po +0 -40
- package/lang/translations/uz.po +0 -40
- package/lang/translations/vi.po +0 -40
- package/lang/translations/zh-cn.po +0 -40
- package/lang/translations/zh.po +0 -40
- package/src/augmentation.js +0 -5
- package/src/codeblock.js +0 -39
- package/src/codeblockcommand.js +0 -142
- package/src/codeblockconfig.js +0 -5
- package/src/codeblockediting.js +0 -430
- package/src/codeblockui.js +0 -134
- package/src/converters.js +0 -285
- package/src/indentcodeblockcommand.js +0 -82
- package/src/index.js +0 -16
- package/src/outdentcodeblockcommand.js +0 -137
- package/src/utils.js +0 -296
- package/theme/codeblock.css +0 -40
- /package/{src → dist}/augmentation.d.ts +0 -0
- /package/{src → dist}/codeblockconfig.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
package/lang/translations/tt.po
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: tt\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr ""
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr ""
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr ""
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr ""
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr ""
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr ""
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr ""
|
package/lang/translations/ug.po
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: ug\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr "كود بۆلىكى قىستۇر"
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr "ساپ تېكىست"
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr ""
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr ""
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr ""
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr ""
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr ""
|
package/lang/translations/uk.po
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: uk\n"
|
|
11
|
-
"Plural-Forms: nplurals=3; plural=(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr "Вставте блок коду"
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr "Простий текст"
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr "Вихід з фрагменту коду %0"
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr "Вхід у фрагмент коду %0"
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr "Вхід у фрагмент коду"
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr "Вихід з фрагменту коду"
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr "Блок коду"
|
package/lang/translations/ur.po
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: ur\n"
|
|
11
|
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr "کوڈ خانہ نصب کیرں"
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr "سادہ متن"
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr ""
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr ""
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr ""
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr ""
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr ""
|
package/lang/translations/uz.po
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: uz\n"
|
|
11
|
-
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr "Kodni kiritish"
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr "Oddiy matn"
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr ""
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr ""
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr ""
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr ""
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr ""
|
package/lang/translations/vi.po
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: vi\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr "Chèn khối mã"
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr "Văn bản thuần"
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr "Đang rời khỏi đoạn mã snippet %0"
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr "Đang nhập đoạn mã snippet %0"
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr "Đang nhập đoạn mã snippet"
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr "Đang rời khỏi đoạn mã snippet"
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr "Khối mã"
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: zh_CN\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr "插入代码块"
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr "纯文本"
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr "正在退出 %0 代码片段"
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr "正在输入 %0 代码片段"
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr "正在输入代码片段"
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr "正在退出代码片段"
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr "代码块"
|
package/lang/translations/zh.po
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Want to contribute to this file? Submit your changes via a GitHub Pull Request.
|
|
4
|
-
#
|
|
5
|
-
# Check out the official contributor's guide:
|
|
6
|
-
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
7
|
-
#
|
|
8
|
-
msgid ""
|
|
9
|
-
msgstr ""
|
|
10
|
-
"Language: zh_TW\n"
|
|
11
|
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
12
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
-
|
|
14
|
-
msgctxt "A label of the button that allows inserting a new code block into the editor content."
|
|
15
|
-
msgid "Insert code block"
|
|
16
|
-
msgstr "插入程式碼區塊"
|
|
17
|
-
|
|
18
|
-
msgctxt "A language of the code block in the editor content when no specific programming language is associated with it."
|
|
19
|
-
msgid "Plain text"
|
|
20
|
-
msgstr "純文字"
|
|
21
|
-
|
|
22
|
-
msgctxt "Assistive technologies label for leaving the code block with a specified programming language. Example: 'Leaving JavaScript code snippet'"
|
|
23
|
-
msgid "Leaving %0 code snippet"
|
|
24
|
-
msgstr "離開 %0 程式碼片段"
|
|
25
|
-
|
|
26
|
-
msgctxt "Assistive technologies label for entering the code block with a specified programming language. Example: 'Entering JavaScript code snippet'"
|
|
27
|
-
msgid "Entering %0 code snippet"
|
|
28
|
-
msgstr "進入 %0 程式碼片段"
|
|
29
|
-
|
|
30
|
-
msgctxt "Assistive technologies label for entering the code block with unspecified programming language."
|
|
31
|
-
msgid "Entering code snippet"
|
|
32
|
-
msgstr "進入程式碼片段"
|
|
33
|
-
|
|
34
|
-
msgctxt "Assistive technologies label for leaving the code block with unspecified programming language."
|
|
35
|
-
msgid "Leaving code snippet"
|
|
36
|
-
msgstr "離開程式碼片段"
|
|
37
|
-
|
|
38
|
-
msgctxt "The accessible label of the menu bar button that inserts a code block into editor content."
|
|
39
|
-
msgid "Code block"
|
|
40
|
-
msgstr "程式碼區塊"
|
package/src/augmentation.js
DELETED
package/src/codeblock.js
DELETED
|
@@ -1,39 +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 code-block/codeblock
|
|
7
|
-
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
-
import { CodeBlockEditing } from './codeblockediting.js';
|
|
10
|
-
import { CodeBlockUI } from './codeblockui.js';
|
|
11
|
-
/**
|
|
12
|
-
* The code block plugin.
|
|
13
|
-
*
|
|
14
|
-
* For more information about this feature check the {@glink api/code-block package page} and the
|
|
15
|
-
* {@glink features/code-blocks code block} feature guide.
|
|
16
|
-
*
|
|
17
|
-
* This is a "glue" plugin that loads the {@link module:code-block/codeblockediting~CodeBlockEditing code block editing feature}
|
|
18
|
-
* and the {@link module:code-block/codeblockui~CodeBlockUI code block UI feature}.
|
|
19
|
-
*/
|
|
20
|
-
export class CodeBlock extends Plugin {
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
static get requires() {
|
|
25
|
-
return [CodeBlockEditing, CodeBlockUI];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @inheritDoc
|
|
29
|
-
*/
|
|
30
|
-
static get pluginName() {
|
|
31
|
-
return 'CodeBlock';
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
static get isOfficialPlugin() {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
}
|
package/src/codeblockcommand.js
DELETED
|
@@ -1,142 +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
|
-
import { Command } from 'ckeditor5/src/core.js';
|
|
6
|
-
import { first } from 'ckeditor5/src/utils.js';
|
|
7
|
-
import { getNormalizedAndLocalizedLanguageDefinitions, canBeCodeBlock } from './utils.js';
|
|
8
|
-
/**
|
|
9
|
-
* The code block command plugin.
|
|
10
|
-
*/
|
|
11
|
-
export class CodeBlockCommand extends Command {
|
|
12
|
-
/**
|
|
13
|
-
* Contains the last used language.
|
|
14
|
-
*/
|
|
15
|
-
_lastLanguage;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
constructor(editor) {
|
|
20
|
-
super(editor);
|
|
21
|
-
this._lastLanguage = null;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @inheritDoc
|
|
25
|
-
*/
|
|
26
|
-
refresh() {
|
|
27
|
-
this.value = this._getValue();
|
|
28
|
-
this.isEnabled = this._checkEnabled();
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Executes the command. When the command {@link #value is on}, all topmost code blocks within
|
|
32
|
-
* the selection will be removed. If it is off, all selected blocks will be flattened and
|
|
33
|
-
* wrapped by a code block.
|
|
34
|
-
*
|
|
35
|
-
* @fires execute
|
|
36
|
-
* @param options Command options.
|
|
37
|
-
* @param options.language The code block language.
|
|
38
|
-
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will apply a code block,
|
|
39
|
-
* otherwise the command will remove the code block. If not set, the command will act basing on its current value.
|
|
40
|
-
* @param options.usePreviousLanguageChoice If set on `true` and the `options.language` is not specified, the command
|
|
41
|
-
* will apply the previous language (if the command was already executed) when inserting the `codeBlock` element.
|
|
42
|
-
*/
|
|
43
|
-
execute(options = {}) {
|
|
44
|
-
const editor = this.editor;
|
|
45
|
-
const model = editor.model;
|
|
46
|
-
const selection = model.document.selection;
|
|
47
|
-
const normalizedLanguagesDefs = getNormalizedAndLocalizedLanguageDefinitions(editor);
|
|
48
|
-
const firstLanguageInConfig = normalizedLanguagesDefs[0];
|
|
49
|
-
const blocks = Array.from(selection.getSelectedBlocks());
|
|
50
|
-
const value = options.forceValue == undefined ? !this.value : options.forceValue;
|
|
51
|
-
const language = getLanguage(options, this._lastLanguage, firstLanguageInConfig.language);
|
|
52
|
-
model.change(writer => {
|
|
53
|
-
if (value) {
|
|
54
|
-
this._applyCodeBlock(writer, blocks, language);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this._removeCodeBlock(writer, blocks);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Checks the command's {@link #value}.
|
|
63
|
-
*
|
|
64
|
-
* @returns The current value.
|
|
65
|
-
*/
|
|
66
|
-
_getValue() {
|
|
67
|
-
const selection = this.editor.model.document.selection;
|
|
68
|
-
const firstBlock = first(selection.getSelectedBlocks());
|
|
69
|
-
const isCodeBlock = !!firstBlock?.is('element', 'codeBlock');
|
|
70
|
-
return isCodeBlock ? firstBlock.getAttribute('language') : false;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Checks whether the command can be enabled in the current context.
|
|
74
|
-
*
|
|
75
|
-
* @returns Whether the command should be enabled.
|
|
76
|
-
*/
|
|
77
|
-
_checkEnabled() {
|
|
78
|
-
if (this.value) {
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
const selection = this.editor.model.document.selection;
|
|
82
|
-
const schema = this.editor.model.schema;
|
|
83
|
-
const firstBlock = first(selection.getSelectedBlocks());
|
|
84
|
-
if (!firstBlock) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
return canBeCodeBlock(schema, firstBlock);
|
|
88
|
-
}
|
|
89
|
-
_applyCodeBlock(writer, blocks, language) {
|
|
90
|
-
this._lastLanguage = language;
|
|
91
|
-
const schema = this.editor.model.schema;
|
|
92
|
-
const allowedBlocks = blocks.filter(block => canBeCodeBlock(schema, block));
|
|
93
|
-
for (const block of allowedBlocks) {
|
|
94
|
-
writer.rename(block, 'codeBlock');
|
|
95
|
-
writer.setAttribute('language', language, block);
|
|
96
|
-
schema.removeDisallowedAttributes([block], writer);
|
|
97
|
-
// Remove children of the `codeBlock` element that are not allowed. See #9567.
|
|
98
|
-
Array.from(block.getChildren())
|
|
99
|
-
.filter(child => !schema.checkChild(block, child))
|
|
100
|
-
.forEach(child => writer.remove(child));
|
|
101
|
-
}
|
|
102
|
-
allowedBlocks.reverse().forEach((currentBlock, i) => {
|
|
103
|
-
const nextBlock = allowedBlocks[i + 1];
|
|
104
|
-
if (currentBlock.previousSibling === nextBlock) {
|
|
105
|
-
writer.appendElement('softBreak', nextBlock);
|
|
106
|
-
writer.merge(writer.createPositionBefore(currentBlock));
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
_removeCodeBlock(writer, blocks) {
|
|
111
|
-
const codeBlocks = blocks.filter(block => block.is('element', 'codeBlock'));
|
|
112
|
-
for (const block of codeBlocks) {
|
|
113
|
-
const range = writer.createRangeOn(block);
|
|
114
|
-
for (const item of Array.from(range.getItems()).reverse()) {
|
|
115
|
-
if (item.is('element', 'softBreak') && item.parent.is('element', 'codeBlock')) {
|
|
116
|
-
const { position } = writer.split(writer.createPositionBefore(item));
|
|
117
|
-
const elementAfter = position.nodeAfter;
|
|
118
|
-
writer.rename(elementAfter, 'paragraph');
|
|
119
|
-
writer.removeAttribute('language', elementAfter);
|
|
120
|
-
writer.remove(item);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
writer.rename(block, 'paragraph');
|
|
124
|
-
writer.removeAttribute('language', block);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Picks the language for the new code block. If any language is passed as an option,
|
|
130
|
-
* it will be returned. Else, if option usePreviousLanguageChoice is true and some
|
|
131
|
-
* code block was already created (lastLanguage is not null) then previously used
|
|
132
|
-
* language will be returned. If not, it will return default language.
|
|
133
|
-
*/
|
|
134
|
-
function getLanguage(options, lastLanguage, defaultLanguage) {
|
|
135
|
-
if (options.language) {
|
|
136
|
-
return options.language;
|
|
137
|
-
}
|
|
138
|
-
if (options.usePreviousLanguageChoice && lastLanguage) {
|
|
139
|
-
return lastLanguage;
|
|
140
|
-
}
|
|
141
|
-
return defaultLanguage;
|
|
142
|
-
}
|