@ckeditor/ckeditor5-code-block 43.3.1 → 44.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/README.md +13 -7
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/converters.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-code-block",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "44.0.0-alpha.0",
|
|
4
4
|
"description": "Code block 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": "
|
|
17
|
-
"@ckeditor/ckeditor5-clipboard": "
|
|
18
|
-
"@ckeditor/ckeditor5-engine": "
|
|
19
|
-
"@ckeditor/ckeditor5-enter": "
|
|
20
|
-
"@ckeditor/ckeditor5-ui": "
|
|
21
|
-
"@ckeditor/ckeditor5-utils": "
|
|
22
|
-
"ckeditor5": "
|
|
16
|
+
"@ckeditor/ckeditor5-core": "44.0.0-alpha.0",
|
|
17
|
+
"@ckeditor/ckeditor5-clipboard": "44.0.0-alpha.0",
|
|
18
|
+
"@ckeditor/ckeditor5-engine": "44.0.0-alpha.0",
|
|
19
|
+
"@ckeditor/ckeditor5-enter": "44.0.0-alpha.0",
|
|
20
|
+
"@ckeditor/ckeditor5-ui": "44.0.0-alpha.0",
|
|
21
|
+
"@ckeditor/ckeditor5-utils": "44.0.0-alpha.0",
|
|
22
|
+
"ckeditor5": "44.0.0-alpha.0"
|
|
23
23
|
},
|
|
24
24
|
"author": "CKSource (http://cksource.com/)",
|
|
25
25
|
"license": "GPL-2.0-or-later",
|
package/src/converters.js
CHANGED
|
@@ -164,6 +164,8 @@ export function dataViewToModelCodeBlockInsertion(editingView, languageDefs) {
|
|
|
164
164
|
if (!codeBlock.hasAttribute('language')) {
|
|
165
165
|
writer.setAttribute('language', defaultLanguageName, codeBlock);
|
|
166
166
|
}
|
|
167
|
+
// Convert children before inserting the code block element
|
|
168
|
+
// to make sure that code block won't be splitted by any block.
|
|
167
169
|
conversionApi.convertChildren(viewCodeElement, codeBlock);
|
|
168
170
|
// Let's try to insert code block.
|
|
169
171
|
if (!conversionApi.safeInsert(codeBlock, data.modelCursor)) {
|