@ckeditor/ckeditor5-clipboard
Advanced tools
Comparing version 0.0.0-nightly-20240827.0 to 0.0.0-nightly-20240828.0
{ | ||
"name": "@ckeditor/ckeditor5-clipboard", | ||
"version": "0.0.0-nightly-20240827.0", | ||
"version": "0.0.0-nightly-20240828.0", | ||
"description": "Clipboard integration feature for CKEditor 5.", | ||
@@ -16,7 +16,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20240827.0", | ||
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20240827.0", | ||
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240827.0", | ||
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20240827.0", | ||
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-20240827.0", | ||
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20240828.0", | ||
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20240828.0", | ||
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240828.0", | ||
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20240828.0", | ||
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-20240828.0", | ||
"lodash-es": "4.17.21" | ||
@@ -23,0 +23,0 @@ }, |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
import { EventInfo } from '@ckeditor/ckeditor5-utils'; | ||
import { EventInfo, getRangeFromMouseEvent } from '@ckeditor/ckeditor5-utils'; | ||
import { DataTransfer, DomEventObserver } from '@ckeditor/ckeditor5-engine'; | ||
@@ -71,3 +71,4 @@ /** | ||
if (domEvent.type == 'drop' || domEvent.type == 'dragover') { | ||
evtData.dropRange = getDropViewRange(this.view, domEvent); | ||
const domRange = getRangeFromMouseEvent(domEvent); | ||
evtData.dropRange = domRange && this.view.domConverter.domRangeToView(domRange); | ||
} | ||
@@ -77,21 +78,1 @@ this.fire(domEvent.type, domEvent, evtData); | ||
} | ||
function getDropViewRange(view, domEvent) { | ||
const domDoc = domEvent.target.ownerDocument; | ||
const x = domEvent.clientX; | ||
const y = domEvent.clientY; | ||
let domRange; | ||
// Webkit & Blink. | ||
if (domDoc.caretRangeFromPoint && domDoc.caretRangeFromPoint(x, y)) { | ||
domRange = domDoc.caretRangeFromPoint(x, y); | ||
} | ||
// FF. | ||
else if (domEvent.rangeParent) { | ||
domRange = domDoc.createRange(); | ||
domRange.setStart(domEvent.rangeParent, domEvent.rangeOffset); | ||
domRange.collapse(true); | ||
} | ||
if (domRange) { | ||
return view.domConverter.domRangeToView(domRange); | ||
} | ||
return null; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
932764
7916
+ Added@ckeditor/ckeditor5-core@0.0.0-nightly-20240828.0(transitive)
+ Added@ckeditor/ckeditor5-engine@0.0.0-nightly-20240828.0(transitive)
+ Added@ckeditor/ckeditor5-enter@0.0.0-nightly-20240828.0(transitive)
+ Added@ckeditor/ckeditor5-typing@0.0.0-nightly-20240828.0(transitive)
+ Added@ckeditor/ckeditor5-ui@0.0.0-nightly-20240828.0(transitive)
+ Added@ckeditor/ckeditor5-utils@0.0.0-nightly-20240828.0(transitive)
+ Added@ckeditor/ckeditor5-watchdog@0.0.0-nightly-20240828.0(transitive)
+ Added@ckeditor/ckeditor5-widget@0.0.0-nightly-20240828.0(transitive)
- Removed@ckeditor/ckeditor5-core@0.0.0-nightly-20240827.0(transitive)
- Removed@ckeditor/ckeditor5-engine@0.0.0-nightly-20240827.0(transitive)
- Removed@ckeditor/ckeditor5-enter@0.0.0-nightly-20240827.0(transitive)
- Removed@ckeditor/ckeditor5-typing@0.0.0-nightly-20240827.0(transitive)
- Removed@ckeditor/ckeditor5-ui@0.0.0-nightly-20240827.0(transitive)
- Removed@ckeditor/ckeditor5-utils@0.0.0-nightly-20240827.0(transitive)
- Removed@ckeditor/ckeditor5-watchdog@0.0.0-nightly-20240827.0(transitive)
- Removed@ckeditor/ckeditor5-widget@0.0.0-nightly-20240827.0(transitive)