@ckeditor/ckeditor5-code-block 43.3.1-alpha.0 → 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 CHANGED
@@ -3,10 +3,22 @@ CKEditor 5 code block feature
3
3
 
4
4
  [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-code-block.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-code-block)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
6
- [![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5)
6
+ [![CircleCI](https://circleci.com/gh/ckeditor/ckeditor5.svg?style=shield)](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master)
7
7
 
8
8
  This package implements the code block feature for CKEditor 5.
9
9
 
10
+ ## Installation
11
+
12
+ This plugin is part of the `ckeditor5` package. Install the whole package to use it.
13
+
14
+ ```bash
15
+ npm install ckeditor5
16
+ ```
17
+
18
+ ## Create free account
19
+
20
+ If you want to check full CKEditor 5 capabilities, sign up for a [free non-commitment 14-day trial](https://portal.ckeditor.com/signup).
21
+
10
22
  ## Demo
11
23
 
12
24
  Check out the [demo in the code block feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/code-blocks.html#demo).
@@ -15,12 +27,6 @@ Check out the [demo in the code block feature guide](https://ckeditor.com/docs/c
15
27
 
16
28
  See the [`@ckeditor/ckeditor5-code-block` package](https://ckeditor.com/docs/ckeditor5/latest/api/code-block.html) page as well as the [code block feature](https://ckeditor.com/docs/ckeditor5/latest/features/code-blocks.html) guide in the [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
17
29
 
18
- ## Installation
19
-
20
- ```bash
21
- npm install ckeditor5
22
- ```
23
-
24
30
  ## License
25
31
 
26
32
  Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
package/dist/index.js CHANGED
@@ -762,6 +762,8 @@ function getLastOutdentableSequenceRange(model, position, sequence) {
762
762
  if (!codeBlock.hasAttribute('language')) {
763
763
  writer.setAttribute('language', defaultLanguageName, codeBlock);
764
764
  }
765
+ // Convert children before inserting the code block element
766
+ // to make sure that code block won't be splitted by any block.
765
767
  conversionApi.convertChildren(viewCodeElement, codeBlock);
766
768
  // Let's try to insert code block.
767
769
  if (!conversionApi.safeInsert(codeBlock, data.modelCursor)) {