@ckeditor/ckeditor5-widget
Advanced tools
Comparing version 27.1.0 to 28.0.0
{ | ||
"name": "@ckeditor/ckeditor5-widget", | ||
"version": "27.1.0", | ||
"version": "28.0.0", | ||
"description": "Widget API for CKEditor 5.", | ||
@@ -14,25 +14,25 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^27.1.0", | ||
"@ckeditor/ckeditor5-engine": "^27.1.0", | ||
"@ckeditor/ckeditor5-enter": "^27.1.0", | ||
"@ckeditor/ckeditor5-ui": "^27.1.0", | ||
"@ckeditor/ckeditor5-utils": "^27.1.0", | ||
"@ckeditor/ckeditor5-typing": "^27.1.0", | ||
"@ckeditor/ckeditor5-core": "^28.0.0", | ||
"@ckeditor/ckeditor5-engine": "^28.0.0", | ||
"@ckeditor/ckeditor5-enter": "^28.0.0", | ||
"@ckeditor/ckeditor5-ui": "^28.0.0", | ||
"@ckeditor/ckeditor5-utils": "^28.0.0", | ||
"@ckeditor/ckeditor5-typing": "^28.0.0", | ||
"lodash-es": "^4.17.15" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^27.1.0", | ||
"@ckeditor/ckeditor5-block-quote": "^27.1.0", | ||
"@ckeditor/ckeditor5-clipboard": "^27.1.0", | ||
"@ckeditor/ckeditor5-editor-balloon": "^27.1.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^27.1.0", | ||
"@ckeditor/ckeditor5-essentials": "^27.1.0", | ||
"@ckeditor/ckeditor5-heading": "^27.1.0", | ||
"@ckeditor/ckeditor5-horizontal-line": "^27.1.0", | ||
"@ckeditor/ckeditor5-image": "^27.1.0", | ||
"@ckeditor/ckeditor5-link": "^27.1.0", | ||
"@ckeditor/ckeditor5-media-embed": "^27.1.0", | ||
"@ckeditor/ckeditor5-paragraph": "^27.1.0", | ||
"@ckeditor/ckeditor5-table": "^27.1.0", | ||
"@ckeditor/ckeditor5-undo": "^27.1.0" | ||
"@ckeditor/ckeditor5-basic-styles": "^28.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^28.0.0", | ||
"@ckeditor/ckeditor5-clipboard": "^28.0.0", | ||
"@ckeditor/ckeditor5-editor-balloon": "^28.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^28.0.0", | ||
"@ckeditor/ckeditor5-essentials": "^28.0.0", | ||
"@ckeditor/ckeditor5-heading": "^28.0.0", | ||
"@ckeditor/ckeditor5-horizontal-line": "^28.0.0", | ||
"@ckeditor/ckeditor5-image": "^28.0.0", | ||
"@ckeditor/ckeditor5-link": "^28.0.0", | ||
"@ckeditor/ckeditor5-media-embed": "^28.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^28.0.0", | ||
"@ckeditor/ckeditor5-table": "^28.0.0", | ||
"@ckeditor/ckeditor5-undo": "^28.0.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "engines": { |
@@ -89,3 +89,3 @@ /** | ||
const redrawFocusedResizerThrottled = throttle( redrawFocusedResizer, 200 ); | ||
this._redrawFocusedResizerThrottled = throttle( redrawFocusedResizer, 200 ); | ||
@@ -97,6 +97,6 @@ // Redraws occurring upon a change of visible resizer must not be throttled, as it is crucial for the initial | ||
// Redrawing on any change of the UI of the editor (including content changes). | ||
this.editor.ui.on( 'update', redrawFocusedResizerThrottled ); | ||
this.editor.ui.on( 'update', this._redrawFocusedResizerThrottled ); | ||
// Resizers need to be redrawn upon window resize, because new window might shrink resize host. | ||
this._observer.listenTo( global.window, 'resize', redrawFocusedResizerThrottled ); | ||
this._observer.listenTo( global.window, 'resize', this._redrawFocusedResizerThrottled ); | ||
@@ -121,2 +121,4 @@ const viewSelection = this.editor.editing.view.document.selection; | ||
} | ||
this._redrawFocusedResizerThrottled.cancel(); | ||
} | ||
@@ -123,0 +125,0 @@ |
@@ -124,2 +124,3 @@ /** | ||
this._enableInsertContentIntegration(); | ||
this._enableDeleteContentIntegration(); | ||
} | ||
@@ -741,2 +742,31 @@ | ||
} | ||
/** | ||
* Attaches the {@link module:engine/model/model~Model#event:deleteContent} event listener to block the event when the fake | ||
* caret is active. | ||
* | ||
* This is required for cases that trigger {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`} | ||
* before calling {@link module:engine/model/model~Model#insertContent `model.insertContent()`} like, for instance, | ||
* plain text pasting. | ||
* | ||
* @private | ||
*/ | ||
_enableDeleteContentIntegration() { | ||
const editor = this.editor; | ||
const model = this.editor.model; | ||
const documentSelection = model.document.selection; | ||
this._listenToIfEnabled( editor.model, 'deleteContent', ( evt, [ selection ] ) => { | ||
if ( selection && !selection.is( 'documentSelection' ) ) { | ||
return; | ||
} | ||
const typeAroundFakeCaretPosition = getTypeAroundFakeCaretPosition( documentSelection ); | ||
// Disable removing the selection content while pasting plain text. | ||
if ( typeAroundFakeCaretPosition ) { | ||
evt.stop(); | ||
} | ||
}, { priority: 'high' } ); | ||
} | ||
} | ||
@@ -743,0 +773,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
200220
59
3289
+ Added@ckeditor/ckeditor5-clipboard@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-core@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-engine@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-enter@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-paragraph@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-select-all@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-typing@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-ui@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-undo@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-upload@28.0.0(transitive)
+ Added@ckeditor/ckeditor5-utils@28.0.0(transitive)
+ Addedckeditor5@28.0.0(transitive)
- Removed@ckeditor/ckeditor5-clipboard@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-core@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-engine@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-enter@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-paragraph@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-select-all@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-typing@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-ui@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-undo@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-upload@27.1.0(transitive)
- Removed@ckeditor/ckeditor5-utils@27.1.0(transitive)
- Removedckeditor5@27.1.0(transitive)