@ckeditor/ckeditor5-clipboard
Advanced tools
Comparing version 21.0.0 to 22.0.0
{ | ||
"name": "@ckeditor/ckeditor5-clipboard", | ||
"version": "21.0.0", | ||
"version": "22.0.0", | ||
"description": "Clipboard integration for CKEditor 5.", | ||
@@ -13,12 +13,12 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^21.0.0", | ||
"@ckeditor/ckeditor5-engine": "^21.0.0", | ||
"@ckeditor/ckeditor5-utils": "^21.0.0" | ||
"@ckeditor/ckeditor5-core": "^22.0.0", | ||
"@ckeditor/ckeditor5-engine": "^22.0.0", | ||
"@ckeditor/ckeditor5-utils": "^22.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^21.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^21.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^21.0.0", | ||
"@ckeditor/ckeditor5-link": "^21.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^21.0.0" | ||
"@ckeditor/ckeditor5-basic-styles": "^22.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^22.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^22.0.0", | ||
"@ckeditor/ckeditor5-link": "^22.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^22.0.0" | ||
}, | ||
@@ -25,0 +25,0 @@ "engines": { |
@@ -106,2 +106,11 @@ /** | ||
// While pasting plain text, apply selection attributes on the text. | ||
if ( isPlainText( modelFragment ) ) { | ||
const node = modelFragment.getChild( 0 ); | ||
model.change( writer => { | ||
writer.setAttributes( modelDocument.selection.getAttributes(), node ); | ||
} ); | ||
} | ||
model.insertContent( modelFragment ); | ||
@@ -202,1 +211,15 @@ evt.stop(); | ||
*/ | ||
// Returns true if specified `documentFragment` represents a plain text. | ||
// | ||
// @param {module:engine/view/documentfragment~DocumentFragment} documentFragment | ||
// @returns {Boolean} | ||
function isPlainText( documentFragment ) { | ||
if ( documentFragment.childCount > 1 ) { | ||
return false; | ||
} | ||
const child = documentFragment.getChild( 0 ); | ||
return [ ...child.getAttributeKeys() ].length == 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
34639
539
+ Added@ckeditor/ckeditor5-core@22.0.0(transitive)
+ Added@ckeditor/ckeditor5-engine@22.0.0(transitive)
+ Added@ckeditor/ckeditor5-utils@22.0.0(transitive)
- Removed@ckeditor/ckeditor5-core@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-engine@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-utils@21.0.0(transitive)