@ckeditor/ckeditor5-enter
Advanced tools
Comparing version 10.1.2 to 10.1.3
Changelog | ||
========= | ||
## [10.1.3](https://github.com/ckeditor/ckeditor5-enter/compare/v10.1.2...v10.1.3) (2018-12-05) | ||
### Bug fixes | ||
* `EnterCommand` will use `writer.split()` also at the beginning and at the end of a block. ([c159958](https://github.com/ckeditor/ckeditor5-enter/commit/c159958)) | ||
## [10.1.2](https://github.com/ckeditor/ckeditor5-enter/compare/v10.1.1...v10.1.2) (2018-10-08) | ||
@@ -5,0 +12,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-enter", | ||
"version": "10.1.2", | ||
"version": "10.1.3", | ||
"description": "Enter feature for CKEditor 5.", | ||
@@ -13,13 +13,13 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^11.0.1", | ||
"@ckeditor/ckeditor5-engine": "^11.0.0", | ||
"@ckeditor/ckeditor5-utils": "^11.0.0" | ||
"@ckeditor/ckeditor5-core": "^11.1.0", | ||
"@ckeditor/ckeditor5-engine": "^12.0.0", | ||
"@ckeditor/ckeditor5-utils": "^11.1.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^10.0.3", | ||
"@ckeditor/ckeditor5-editor-classic": "^11.0.1", | ||
"@ckeditor/ckeditor5-heading": "^10.1.0", | ||
"@ckeditor/ckeditor5-paragraph": "^10.0.3", | ||
"@ckeditor/ckeditor5-typing": "^11.0.1", | ||
"@ckeditor/ckeditor5-undo": "^10.0.3", | ||
"@ckeditor/ckeditor5-basic-styles": "^10.1.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^11.0.2", | ||
"@ckeditor/ckeditor5-heading": "^10.1.1", | ||
"@ckeditor/ckeditor5-paragraph": "^10.0.4", | ||
"@ckeditor/ckeditor5-typing": "^11.0.2", | ||
"@ckeditor/ckeditor5-undo": "^10.0.4", | ||
"eslint": "^5.5.0", | ||
@@ -26,0 +26,0 @@ "eslint-config-ckeditor5": "^1.0.7", |
@@ -59,3 +59,3 @@ /** | ||
if ( isSelectionEmpty ) { | ||
splitBlock( writer, selection, range.start ); | ||
splitBlock( writer, range.start ); | ||
} else { | ||
@@ -72,3 +72,3 @@ const leaveUnmerged = !( range.start.isAtStart && range.end.isAtEnd ); | ||
if ( isContainedWithinOneElement ) { | ||
splitBlock( writer, selection, selection.focus ); | ||
splitBlock( writer, selection.focus ); | ||
} | ||
@@ -85,21 +85,5 @@ // Selection over multiple elements. | ||
function splitBlock( writer, selection, splitPos ) { | ||
const oldElement = splitPos.parent; | ||
const newElement = new oldElement.constructor( oldElement.name, oldElement.getAttributes() ); | ||
if ( splitPos.isAtEnd ) { | ||
// If the split is at the end of element, instead of splitting, just create a clone of position's parent | ||
// element and insert it after split element. The result is the same but less operations are done | ||
// and it's more semantically correct (when it comes to operational transformation). | ||
writer.insert( newElement, splitPos.parent, 'after' ); | ||
} else if ( splitPos.isAtStart ) { | ||
// If the split is at the start of element, instead of splitting, just create a clone of position's parent | ||
// element and insert it before split element. The result is the same but less operations are done | ||
// and it's more semantically correct (when it comes to operational transformation). | ||
writer.insert( newElement, splitPos.parent, 'before' ); | ||
} else { | ||
writer.split( splitPos ); | ||
} | ||
function splitBlock( writer, splitPos ) { | ||
writer.split( splitPos ); | ||
writer.setSelection( splitPos.parent.nextSibling, 0 ); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20848
345
- Removed@ckeditor/ckeditor5-engine@11.0.0(transitive)