Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-enter

Package Overview
Dependencies
Maintainers
1
Versions
704
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-enter - npm Package Compare versions

Comparing version 11.0.4 to 11.1.0

src/utils.js

11

CHANGELOG.md
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 @@

22

package.json
{
"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 );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc