Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into t/ckeditor5-engine/1336
Browse files Browse the repository at this point in the history
  • Loading branch information
jodator committed Jan 4, 2019
2 parents 05be404 + dce3693 commit 3d016d8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Changelog
=========

## [11.0.3](https://github.com/ckeditor/ckeditor5-list/compare/v11.0.2...v11.0.3) (2018-12-05)

### Bug fixes

* Block filler will be inserted into the list item if its last child is a `<br>` element. Closes [ckeditor/ckeditor5#1312](https://github.com/ckeditor/ckeditor5/issues/1312). ([cb6708e](https://github.com/ckeditor/ckeditor5-list/commit/cb6708e))
* Preserve correct order of block elements inside list items during the view to model conversion. Closes [ckeditor/ckeditor5#1263](https://github.com/ckeditor/ckeditor5/issues/1263). ([abccef4](https://github.com/ckeditor/ckeditor5-list/commit/abccef4))

### Other changes

* Improved SVG icons size. See [ckeditor/ckeditor5-theme-lark#206](https://github.com/ckeditor/ckeditor5-theme-lark/issues/206). ([d424329](https://github.com/ckeditor/ckeditor5-list/commit/d424329))


## [11.0.2](https://github.com/ckeditor/ckeditor5-list/compare/v11.0.1...v11.0.2) (2018-10-08)

### Other changes
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ckeditor/ckeditor5-list",
"version": "11.0.2",
"version": "11.0.3",
"description": "Ordered and unordered lists feature to CKEditor 5.",
"keywords": [
"ckeditor",
Expand All @@ -10,24 +10,24 @@
"ckeditor5-plugin"
],
"dependencies": {
"@ckeditor/ckeditor5-core": "^11.0.1",
"@ckeditor/ckeditor5-engine": "^11.0.0",
"@ckeditor/ckeditor5-paragraph": "^10.0.3",
"@ckeditor/ckeditor5-ui": "^11.1.0",
"@ckeditor/ckeditor5-utils": "^11.0.0"
"@ckeditor/ckeditor5-core": "^11.1.0",
"@ckeditor/ckeditor5-engine": "^12.0.0",
"@ckeditor/ckeditor5-paragraph": "^10.0.4",
"@ckeditor/ckeditor5-ui": "^11.2.0",
"@ckeditor/ckeditor5-utils": "^11.1.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "^10.0.3",
"@ckeditor/ckeditor5-block-quote": "^10.1.0",
"@ckeditor/ckeditor5-clipboard": "^10.0.3",
"@ckeditor/ckeditor5-editor-classic": "^11.0.1",
"@ckeditor/ckeditor5-enter": "^10.1.2",
"@ckeditor/ckeditor5-heading": "^10.1.0",
"@ckeditor/ckeditor5-link": "^10.0.4",
"@ckeditor/ckeditor5-typing": "^11.0.1",
"@ckeditor/ckeditor5-undo": "^10.0.3",
"@ckeditor/ckeditor5-basic-styles": "^10.1.0",
"@ckeditor/ckeditor5-block-quote": "^10.1.1",
"@ckeditor/ckeditor5-clipboard": "^10.0.4",
"@ckeditor/ckeditor5-editor-classic": "^11.0.2",
"@ckeditor/ckeditor5-enter": "^10.1.3",
"@ckeditor/ckeditor5-heading": "^10.1.1",
"@ckeditor/ckeditor5-link": "^10.1.0",
"@ckeditor/ckeditor5-typing": "^11.0.2",
"@ckeditor/ckeditor5-undo": "^10.0.4",
"eslint": "^5.5.0",
"eslint-config-ckeditor5": "^1.0.7",
"eslint-config-ckeditor5": "^1.0.9",
"husky": "^0.14.3",
"lint-staged": "^7.0.0"
},
Expand Down
19 changes: 10 additions & 9 deletions tests/listediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtest
import { getData as getModelData, parse as parseModel, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
import { getData as getViewData, parse as parseView } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';

import { insertElement } from '@ckeditor/ckeditor5-engine/src/conversion/downcast-converters';
import { upcastElementToElement } from '@ckeditor/ckeditor5-engine/src/conversion/upcast-converters';
import { getCode } from '@ckeditor/ckeditor5-utils/src/keyboard';

describe( 'ListEditing', () => {
Expand Down Expand Up @@ -345,6 +343,10 @@ describe( 'ListEditing', () => {
'<p>foo</p><ul><li>xxx</li><li>yyy</li></ul>'
);

// #ckeditor5/1399
test( 'single item with `font-weight` style',
'<ol><li style="font-weight: bold">foo</li></ol>', '<ol><li><strong>foo</strong></li></ol>' );

it( 'model test for mixed content', () => {
editor.setData( '<ol><li>a</li></ol><p>xxx</p><ul><li>b</li><li>c</li></ul><p>yyy</p><ul><li>d</li></ul>' );

Expand Down Expand Up @@ -3813,12 +3815,11 @@ describe( 'ListEditing', () => {
editor.editing.downcastDispatcher.on( 'insert:listItem', ( evt, data, conversionApi ) => {
conversionApi.consumable.consume( data.item, 'attribute:listType' );
conversionApi.consumable.consume( data.item, 'attribute:listIndent' );

const converter = insertElement( ( modelElement, viewWriter ) => viewWriter.createContainerElement( 'p' ) );

return converter( evt, data, conversionApi );
}, { priority: 'highest' } );

editor.conversion.for( 'downcast' )
.elementToElement( { model: 'listItem', view: 'p', converterPriority: 'highest' } );

// Paragraph is needed, otherwise selection throws.
setModelData( model, '<paragraph>x</paragraph><listItem listIndent="0" listType="bulleted">y</listItem>' );

Expand Down Expand Up @@ -4022,7 +4023,7 @@ describe( 'ListEditing', () => {
} );

it( 'should split parent element when one of modelCursor ancestors allows to insert list - in the middle', () => {
editor.conversion.for( 'upcast' ).add( upcastElementToElement( { view: 'div', model: 'div' } ) );
editor.conversion.for( 'upcast' ).elementToElement( { view: 'div', model: 'div' } );
model.schema.register( 'div', { inheritAllFrom: '$block' } );

editor.setData(
Expand All @@ -4043,7 +4044,7 @@ describe( 'ListEditing', () => {
} );

it( 'should split parent element when one of modelCursor ancestors allows to insert list - at the end', () => {
editor.conversion.for( 'upcast' ).add( upcastElementToElement( { view: 'div', model: 'div' } ) );
editor.conversion.for( 'upcast' ).elementToElement( { view: 'div', model: 'div' } );
model.schema.register( 'div', { inheritAllFrom: '$block' } );

editor.setData(
Expand All @@ -4062,7 +4063,7 @@ describe( 'ListEditing', () => {
} );

it( 'should split parent element when one of modelCursor ancestors allows to insert list - at the beginning', () => {
editor.conversion.for( 'upcast' ).add( upcastElementToElement( { view: 'div', model: 'div' } ) );
editor.conversion.for( 'upcast' ).elementToElement( { view: 'div', model: 'div' } );
model.schema.register( 'div', { inheritAllFrom: '$block' } );

editor.setData(
Expand Down

0 comments on commit 3d016d8

Please sign in to comment.