@ckeditor/ckeditor5-enter
Advanced tools
Comparing version 11.0.4 to 11.1.0
Changelog | ||
========= | ||
## [11.1.0](https://github.com/ckeditor/ckeditor5-enter/compare/v11.0.4...v11.1.0) (2019-08-26) | ||
### Features | ||
* Attributes (of the text and element) will be copied to the next line on <kbd>Enter</kbd>. This functionality needs to be turned on by setting `copyOnEnter` in the schema for each attribute that you register. Closes [#40](https://github.com/ckeditor/ckeditor5-enter/issues/40). ([36bdcd8](https://github.com/ckeditor/ckeditor5-enter/commit/36bdcd8)) | ||
### Other changes | ||
* The issue tracker for this package was moved to https://github.com/ckeditor/ckeditor5/issues. See [ckeditor/ckeditor5#1988](https://github.com/ckeditor/ckeditor5/issues/1988). ([036217a](https://github.com/ckeditor/ckeditor5-enter/commit/036217a)) | ||
## [11.0.4](https://github.com/ckeditor/ckeditor5-enter/compare/v11.0.3...v11.0.4) (2019-07-10) | ||
@@ -5,0 +16,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-enter", | ||
"version": "11.0.4", | ||
"version": "11.1.0", | ||
"description": "Enter feature for CKEditor 5.", | ||
@@ -13,13 +13,13 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^12.2.1", | ||
"@ckeditor/ckeditor5-engine": "^13.2.1", | ||
"@ckeditor/ckeditor5-utils": "^13.0.1" | ||
"@ckeditor/ckeditor5-core": "^12.3.0", | ||
"@ckeditor/ckeditor5-engine": "^14.0.0", | ||
"@ckeditor/ckeditor5-utils": "^14.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^11.1.3", | ||
"@ckeditor/ckeditor5-editor-classic": "^12.1.3", | ||
"@ckeditor/ckeditor5-heading": "^11.0.4", | ||
"@ckeditor/ckeditor5-paragraph": "^11.0.4", | ||
"@ckeditor/ckeditor5-typing": "^12.1.1", | ||
"@ckeditor/ckeditor5-undo": "^11.0.4", | ||
"@ckeditor/ckeditor5-basic-styles": "^11.1.4", | ||
"@ckeditor/ckeditor5-editor-classic": "^12.1.4", | ||
"@ckeditor/ckeditor5-heading": "^11.0.5", | ||
"@ckeditor/ckeditor5-paragraph": "^11.0.5", | ||
"@ckeditor/ckeditor5-typing": "^12.2.0", | ||
"@ckeditor/ckeditor5-undo": "^11.0.5", | ||
"eslint": "^5.5.0", | ||
@@ -37,3 +37,3 @@ "eslint-config-ckeditor5": "^2.0.0", | ||
"homepage": "https://ckeditor.com/ckeditor-5", | ||
"bugs": "https://github.com/ckeditor/ckeditor5-enter/issues", | ||
"bugs": "https://github.com/ckeditor/ckeditor5/issues", | ||
"repository": { | ||
@@ -40,0 +40,0 @@ "type": "git", |
@@ -11,2 +11,3 @@ /** | ||
import Command from '@ckeditor/ckeditor5-core/src/command'; | ||
import { getCopyOnEnterAttributes } from './utils'; | ||
@@ -60,3 +61,5 @@ /** | ||
if ( isSelectionEmpty ) { | ||
const attributesToCopy = getCopyOnEnterAttributes( writer.model.schema, selection.getAttributes() ); | ||
splitBlock( writer, range.start ); | ||
writer.setSelectionAttribute( attributesToCopy ); | ||
} else { | ||
@@ -63,0 +66,0 @@ const leaveUnmerged = !( range.start.isAtStart && range.end.isAtEnd ); |
@@ -17,3 +17,3 @@ /** | ||
* | ||
* @extends module:engine/view/observer~Observer | ||
* @extends module:engine/view/observer/observer~Observer | ||
*/ | ||
@@ -20,0 +20,0 @@ export default class EnterObserver extends Observer { |
@@ -11,2 +11,3 @@ /** | ||
import Command from '@ckeditor/ckeditor5-core/src/command'; | ||
import { getCopyOnEnterAttributes } from './utils'; | ||
@@ -85,3 +86,7 @@ /** | ||
if ( isSelectionEmpty ) { | ||
const attributesToCopy = getCopyOnEnterAttributes( model.schema, selection.getAttributes() ); | ||
insertBreak( writer, range.end ); | ||
writer.removeSelectionAttribute( selection.getAttributeKeys() ); | ||
writer.setSelectionAttribute( attributesToCopy ); | ||
} else { | ||
@@ -88,0 +93,0 @@ const leaveUnmerged = !( range.start.isAtStart && range.end.isAtEnd ); |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
23816
10
379
- Removed@ckeditor/ckeditor5-engine@13.2.1(transitive)
- Removed@ckeditor/ckeditor5-utils@13.0.1(transitive)