@ckeditor/ckeditor5-clipboard
Advanced tools
Comparing version 35.4.0 to 36.0.0
@@ -5,3 +5,3 @@ Software License Agreement | ||
**CKEditor 5 clipboard feature** – https://github.com/ckeditor/ckeditor5-clipboard <br> | ||
Copyright (c) 2003-2022, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved. | ||
Copyright (c) 2003-2023, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved. | ||
@@ -8,0 +8,0 @@ Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). |
{ | ||
"name": "@ckeditor/ckeditor5-clipboard", | ||
"version": "35.4.0", | ||
"version": "36.0.0", | ||
"description": "Clipboard integration feature for CKEditor 5.", | ||
@@ -15,26 +15,26 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^35.4.0", | ||
"@ckeditor/ckeditor5-engine": "^35.4.0", | ||
"@ckeditor/ckeditor5-utils": "^35.4.0", | ||
"@ckeditor/ckeditor5-widget": "^35.4.0", | ||
"@ckeditor/ckeditor5-core": "^36.0.0", | ||
"@ckeditor/ckeditor5-engine": "^36.0.0", | ||
"@ckeditor/ckeditor5-utils": "^36.0.0", | ||
"@ckeditor/ckeditor5-widget": "^36.0.0", | ||
"lodash-es": "^4.17.11" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-alignment": "^35.4.0", | ||
"@ckeditor/ckeditor5-basic-styles": "^35.4.0", | ||
"@ckeditor/ckeditor5-block-quote": "^35.4.0", | ||
"@ckeditor/ckeditor5-cloud-services": "^35.4.0", | ||
"@ckeditor/ckeditor5-code-block": "^35.4.0", | ||
"@ckeditor/ckeditor5-easy-image": "^35.4.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^35.4.0", | ||
"@ckeditor/ckeditor5-enter": "^35.4.0", | ||
"@ckeditor/ckeditor5-horizontal-line": "^35.4.0", | ||
"@ckeditor/ckeditor5-image": "^35.4.0", | ||
"@ckeditor/ckeditor5-link": "^35.4.0", | ||
"@ckeditor/ckeditor5-page-break": "^35.4.0", | ||
"@ckeditor/ckeditor5-paragraph": "^35.4.0", | ||
"@ckeditor/ckeditor5-paste-from-office": "^35.4.0", | ||
"@ckeditor/ckeditor5-remove-format": "^35.4.0", | ||
"@ckeditor/ckeditor5-table": "^35.4.0", | ||
"@ckeditor/ckeditor5-typing": "^35.4.0", | ||
"@ckeditor/ckeditor5-alignment": "^36.0.0", | ||
"@ckeditor/ckeditor5-basic-styles": "^36.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^36.0.0", | ||
"@ckeditor/ckeditor5-cloud-services": "^36.0.0", | ||
"@ckeditor/ckeditor5-code-block": "^36.0.0", | ||
"@ckeditor/ckeditor5-easy-image": "^36.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^36.0.0", | ||
"@ckeditor/ckeditor5-enter": "^36.0.0", | ||
"@ckeditor/ckeditor5-horizontal-line": "^36.0.0", | ||
"@ckeditor/ckeditor5-image": "^36.0.0", | ||
"@ckeditor/ckeditor5-link": "^36.0.0", | ||
"@ckeditor/ckeditor5-page-break": "^36.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^36.0.0", | ||
"@ckeditor/ckeditor5-paste-from-office": "^36.0.0", | ||
"@ckeditor/ckeditor5-remove-format": "^36.0.0", | ||
"@ckeditor/ckeditor5-table": "^36.0.0", | ||
"@ckeditor/ckeditor5-typing": "^36.0.0", | ||
"typescript": "^4.8.4", | ||
@@ -41,0 +41,0 @@ "webpack": "^5.58.1", |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -21,4 +21,2 @@ */ | ||
* * {@link module:clipboard/pasteplaintext~PastePlainText} | ||
* | ||
* @extends module:core/plugin~Plugin | ||
*/ | ||
@@ -25,0 +23,0 @@ export default class Clipboard extends Plugin { |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -31,4 +31,2 @@ */ | ||
* {@link module:clipboard/clipboard~Clipboard} plugin which adds this observer automatically (because it uses it). | ||
* | ||
* @extends module:engine/view/observer/domeventobserver~DomEventObserver | ||
*/ | ||
@@ -93,191 +91,1 @@ export default class ClipboardObserver extends DomEventObserver { | ||
} | ||
/** | ||
* Fired as a continuation of the {@link #event:paste} and {@link #event:drop} events. | ||
* | ||
* It is a part of the {@glink framework/guides/deep-dive/clipboard#input-pipeline clipboard input pipeline}. | ||
* | ||
* This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed | ||
* and inserted into the editor. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:clipboard/clipboardobserver~ClipboardObserver | ||
* @see module:clipboard/clipboard~Clipboard | ||
* @event module:engine/view/document~Document#event:clipboardInput | ||
* @param {Object} data The event data. | ||
* @param {module:engine/view/datatransfer~DataTransfer} data.dataTransfer Data transfer instance. | ||
* @param {'paste'|'drop'} method Whether the event was triggered by a paste or drop operation. | ||
* @param {module:engine/view/element~Element} target The tree view element representing the target. | ||
* @param {Array.<module:engine/view/range~Range>} data.targetRanges Ranges which are the target of the operation | ||
* (usually – into which the content should be inserted). | ||
* If the clipboard input was triggered by a paste operation, this property is not set. If by a drop operation, | ||
* then it is the drop position (which can be different than the selection at the moment of drop). | ||
*/ | ||
/** | ||
* Fired when the user drags the content over one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:engine/view/document~Document#event:clipboardInput | ||
* @event module:engine/view/document~Document#event:dragover | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ | ||
/** | ||
* Fired when the user dropped the content into one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:engine/view/document~Document#event:clipboardInput | ||
* @event module:engine/view/document~Document#event:drop | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
* @param {module:engine/view/range~Range} dropRange The position into which the content is dropped. | ||
*/ | ||
/** | ||
* Fired when the user pasted the content into one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:engine/view/document~Document#event:clipboardInput | ||
* @event module:engine/view/document~Document#event:paste | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ | ||
/** | ||
* Fired when the user copied the content from one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:clipboard/clipboardobserver~ClipboardObserver | ||
* @event module:engine/view/document~Document#event:copy | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ | ||
/** | ||
* Fired when the user cut the content from one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:clipboard/clipboardobserver~ClipboardObserver | ||
* @event module:engine/view/document~Document#event:cut | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ | ||
/** | ||
* The value of the {@link module:engine/view/document~Document#event:paste}, | ||
* {@link module:engine/view/document~Document#event:copy} and {@link module:engine/view/document~Document#event:cut} events. | ||
* | ||
* In order to access the clipboard data, use the `dataTransfer` property. | ||
* | ||
* @class module:clipboard/clipboardobserver~ClipboardEventData | ||
* @extends module:engine/view/observer/domeventdata~DomEventData | ||
*/ | ||
/** | ||
* The data transfer instance. | ||
* | ||
* @readonly | ||
* @member {module:engine/view/datatransfer~DataTransfer} module:clipboard/clipboardobserver~ClipboardEventData#dataTransfer | ||
*/ | ||
/** | ||
* Fired as a continuation of the {@link #event:dragover} event. | ||
* | ||
* It is a part of the {@glink framework/guides/deep-dive/clipboard#input-pipeline clipboard input pipeline}. | ||
* | ||
* This event carries a `dataTransfer` object which comes from the clipboard and whose content should be processed | ||
* and inserted into the editor. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:clipboard/clipboardobserver~ClipboardObserver | ||
* @see module:clipboard/clipboard~Clipboard | ||
* @event module:engine/view/document~Document#event:dragging | ||
* @param {Object} data The event data. | ||
* @param {module:engine/view/datatransfer~DataTransfer} data.dataTransfer The data transfer instance. | ||
* @param {module:engine/view/element~Element} target The tree view element representing the target. | ||
* @param {Array.<module:engine/view/range~Range>} data.targetRanges Ranges which are the target of the operation | ||
* (usually – into which the content should be inserted). | ||
* It is the drop position (which can be different than the selection at the moment of drop). | ||
*/ | ||
/** | ||
* Fired when the user starts dragging the content in one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:engine/view/document~Document#event:clipboardInput | ||
* @event module:engine/view/document~Document#event:dragstart | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ | ||
/** | ||
* Fired when the user ended dragging the content. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:engine/view/document~Document#event:clipboardInput | ||
* @event module:engine/view/document~Document#event:dragend | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ | ||
/** | ||
* Fired when the user drags the content into one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:engine/view/document~Document#event:clipboardInput | ||
* @event module:engine/view/document~Document#event:dragenter | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ | ||
/** | ||
* Fired when the user drags the content out of one of the editing roots of the editor. | ||
* | ||
* Introduced by {@link module:clipboard/clipboardobserver~ClipboardObserver}. | ||
* | ||
* **Note**: This event is not available by default. To make it available, {@link module:clipboard/clipboardobserver~ClipboardObserver} | ||
* needs to be added to the {@link module:engine/view/document~Document} by using the {@link module:engine/view/view~View#addObserver} | ||
* method. This is usually done by the {@link module:clipboard/clipboard~Clipboard} plugin, but if for some reason it is not loaded, | ||
* the observer must be added manually. | ||
* | ||
* @see module:engine/view/document~Document#event:clipboardInput | ||
* @event module:engine/view/document~Document#event:dragleave | ||
* @param {module:clipboard/clipboardobserver~ClipboardEventData} data The event data. | ||
*/ |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -113,4 +113,2 @@ */ | ||
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep-dive guide}. | ||
* | ||
* @extends module:core/plugin~Plugin | ||
*/ | ||
@@ -136,4 +134,2 @@ export default class ClipboardPipeline extends Plugin { | ||
* The clipboard paste pipeline. | ||
* | ||
* @private | ||
*/ | ||
@@ -214,4 +210,2 @@ _setupPasteDrop() { | ||
* The clipboard copy/cut pipeline. | ||
* | ||
* @private | ||
*/ | ||
@@ -218,0 +212,0 @@ _setupCopyCut() { |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -98,4 +98,2 @@ */ | ||
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep-dive guide}. | ||
* | ||
* @extends module:core/plugin~Plugin | ||
*/ | ||
@@ -121,45 +119,7 @@ export default class DragDrop extends Plugin { | ||
const view = editor.editing.view; | ||
/** | ||
* The live range over the original content that is being dragged. | ||
* | ||
* @private | ||
* @type {module:engine/model/liverange~LiveRange} | ||
*/ | ||
this._draggedRange = null; | ||
/** | ||
* The UID of current dragging that is used to verify if the drop started in the same editor as the drag start. | ||
* | ||
* **Note**: This is a workaround for broken 'dragend' events (they are not fired if the source text node got removed). | ||
* | ||
* @private | ||
* @type {String} | ||
*/ | ||
this._draggingUid = ''; | ||
/** | ||
* The reference to the model element that currently has a `draggable` attribute set (it is set while dragging). | ||
* | ||
* @private | ||
* @type {module:engine/model/element~Element} | ||
*/ | ||
this._draggableElement = null; | ||
/** | ||
* A throttled callback updating the drop marker. | ||
* | ||
* @private | ||
* @type {Function} | ||
*/ | ||
this._updateDropMarkerThrottled = throttle(targetRange => this._updateDropMarker(targetRange), 40); | ||
/** | ||
* A delayed callback removing the drop marker. | ||
* | ||
* @private | ||
* @type {Function} | ||
*/ | ||
this._removeDropMarkerDelayed = delay(() => this._removeDropMarker(), 40); | ||
/** | ||
* A delayed callback removing draggable attributes. | ||
* | ||
* @private | ||
* @type {Function} | ||
*/ | ||
this._clearDraggableAttributesDelayed = delay(() => this._clearDraggableAttributes(), 40); | ||
@@ -205,4 +165,2 @@ view.addObserver(ClipboardObserver); | ||
* Drag and drop events handling. | ||
* | ||
* @private | ||
*/ | ||
@@ -312,4 +270,2 @@ _setupDragging() { | ||
* Integration with the `clipboardInput` event. | ||
* | ||
* @private | ||
*/ | ||
@@ -355,4 +311,2 @@ _setupClipboardInputIntegration() { | ||
* Integration with the `contentInsertion` event of the clipboard pipeline. | ||
* | ||
* @private | ||
*/ | ||
@@ -385,4 +339,2 @@ _setupContentInsertionIntegration() { | ||
* Adds listeners that add the `draggable` attribute to the elements while the mouse button is down so the dragging could start. | ||
* | ||
* @private | ||
*/ | ||
@@ -434,4 +386,2 @@ _setupDraggableAttributeHandling() { | ||
* Removes the `draggable` attribute from the element that was used for dragging. | ||
* | ||
* @private | ||
*/ | ||
@@ -450,4 +400,2 @@ _clearDraggableAttributes() { | ||
* Creates downcast conversion for the drop target marker. | ||
* | ||
* @private | ||
*/ | ||
@@ -483,4 +431,3 @@ _setupDropMarker() { | ||
* | ||
* @private | ||
* @param {module:engine/model/range~Range} targetRange The range to set the marker to. | ||
* @param targetRange The range to set the marker to. | ||
*/ | ||
@@ -507,4 +454,2 @@ _updateDropMarker(targetRange) { | ||
* Removes the drop target marker. | ||
* | ||
* @private | ||
*/ | ||
@@ -524,4 +469,3 @@ _removeDropMarker() { | ||
* | ||
* @private | ||
* @param {Boolean} moved Whether the move succeeded. | ||
* @param moved Whether the move succeeded. | ||
*/ | ||
@@ -548,8 +492,5 @@ _finalizeDragging(moved) { | ||
} | ||
// Returns fixed selection range for given position and target element. | ||
// | ||
// @param {module:core/editor/editor~Editor} editor | ||
// @param {Array.<module:engine/view/range~Range>} targetViewRanges | ||
// @param {module:engine/view/element~Element} targetViewElement | ||
// @returns {module:engine/model/range~Range|null} | ||
/** | ||
* Returns fixed selection range for given position and target element. | ||
*/ | ||
function findDropTargetRange(editor, targetViewRanges, targetViewElement) { | ||
@@ -596,7 +537,5 @@ const model = editor.model; | ||
} | ||
// Returns fixed selection range for a given position and a target element if it is over the widget but not over its nested editable. | ||
// | ||
// @param {module:core/editor/editor~Editor} editor | ||
// @param {module:engine/view/element~Element} targetViewElement | ||
// @returns {module:engine/model/range~Range|null} | ||
/** | ||
* Returns fixed selection range for a given position and a target element if it is over the widget but not over its nested editable. | ||
*/ | ||
function findDropTargetRangeOnWidget(editor, targetViewElement) { | ||
@@ -620,7 +559,5 @@ const model = editor.model; | ||
} | ||
// Returns fixed selection range inside a model element. | ||
// | ||
// @param {module:core/editor/editor~Editor} editor | ||
// @param {module:engine/model/element~Element} targetModelElement | ||
// @returns {module:engine/model/range~Range} | ||
/** | ||
* Returns fixed selection range inside a model element. | ||
*/ | ||
function findDropTargetRangeInElement(editor, targetModelElement) { | ||
@@ -632,8 +569,5 @@ const model = editor.model; | ||
} | ||
// Returns fixed selection range for a given position and a target element if the drop is between blocks. | ||
// | ||
// @param {module:core/editor/editor~Editor} editor | ||
// @param {module:engine/model/position~Position} targetModelPosition | ||
// @param {module:engine/model/element~Element} targetModelElement | ||
// @returns {module:engine/model/range~Range|null} | ||
/** | ||
* Returns fixed selection range for a given position and a target element if the drop is between blocks. | ||
*/ | ||
function findDropTargetRangeBetweenBlocks(editor, targetModelPosition, targetModelElement) { | ||
@@ -659,7 +593,5 @@ const model = editor.model; | ||
} | ||
// Returns a selection range on the ancestor object. | ||
// | ||
// @param {module:core/editor/editor~Editor} editor | ||
// @param {module:engine/model/element~Element} element | ||
// @returns {module:engine/model/range~Range} | ||
/** | ||
* Returns a selection range on the ancestor object. | ||
*/ | ||
function findDropTargetRangeOnAncestorObject(editor, element) { | ||
@@ -677,7 +609,5 @@ const model = editor.model; | ||
} | ||
// Returns the closest model element for the specified view element. | ||
// | ||
// @param {module:core/editor/editor~Editor} editor | ||
// @param {module:engine/view/element~Element} element | ||
// @returns {module:engine/model/element~Element} | ||
/** | ||
* Returns the closest model element for the specified view element. | ||
*/ | ||
function getClosestMappedModelElement(editor, element) { | ||
@@ -695,4 +625,6 @@ const mapper = editor.editing.mapper; | ||
} | ||
// Returns the drop effect that should be a result of dragging the content. | ||
// This function is handling a quirk when checking the effect in the 'drop' DOM event. | ||
/** | ||
* Returns the drop effect that should be a result of dragging the content. | ||
* This function is handling a quirk when checking the effect in the 'drop' DOM event. | ||
*/ | ||
function getFinalDropEffect(dataTransfer) { | ||
@@ -704,8 +636,8 @@ if (env.isGecko) { | ||
} | ||
// Returns a function wrapper that will trigger a function after a specified wait time. | ||
// The timeout can be canceled by calling the cancel function on the returned wrapped function. | ||
// | ||
// @param {Function} func The function to wrap. | ||
// @param {Number} wait The timeout in ms. | ||
// @returns {Function} | ||
/** | ||
* Returns a function wrapper that will trigger a function after a specified wait time. | ||
* The timeout can be canceled by calling the cancel function on the returned wrapped function. | ||
* @param func The function to wrap. | ||
* @param wait The timeout in ms. | ||
*/ | ||
function delay(func, wait) { | ||
@@ -722,6 +654,5 @@ let timer; | ||
} | ||
// Returns a widget element that should be dragged. | ||
// | ||
// @param {module:engine/view/element~Element} target | ||
// @returns {module:engine/view/element~Element} | ||
/** | ||
* Returns a widget element that should be dragged. | ||
*/ | ||
function findDraggableWidget(target) { | ||
@@ -728,0 +659,0 @@ // This is directly an editable so not a widget for sure. |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -4,0 +4,0 @@ */ |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -15,4 +15,2 @@ */ | ||
* For example, it detects the <kbd>Ctrl/Cmd</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> keystroke. | ||
* | ||
* @extends module:core/plugin~Plugin | ||
*/ | ||
@@ -73,7 +71,5 @@ export default class PastePlainText extends Plugin { | ||
} | ||
// Returns true if specified `documentFragment` represents a plain text. | ||
// | ||
// @param {module:engine/view/documentfragment~DocumentFragment} documentFragment | ||
// @param {module:engine/model/schema~Schema} schema | ||
// @returns {Boolean} | ||
/** | ||
* Returns true if specified `documentFragment` represents a plain text. | ||
*/ | ||
function isPlainTextFragment(documentFragment, schema) { | ||
@@ -80,0 +76,0 @@ if (documentFragment.childCount > 1) { |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -12,4 +12,4 @@ */ | ||
* | ||
* @param {String} data The HTML data to normalize. | ||
* @returns {String} Normalized HTML. | ||
* @param data The HTML data to normalize. | ||
* @returns Normalized HTML. | ||
*/ | ||
@@ -16,0 +16,0 @@ export default function normalizeClipboardData(data) { |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -11,4 +11,4 @@ */ | ||
* | ||
* @param {String} text The plain text to convert. | ||
* @returns {String} HTML generated from the plain text. | ||
* @param text The plain text to convert. | ||
* @returns HTML generated from the plain text. | ||
*/ | ||
@@ -15,0 +15,0 @@ export default function plainTextToHtml(text) { |
/** | ||
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. | ||
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
@@ -12,4 +12,4 @@ */ | ||
* | ||
* @param {module:engine/view/item~Item} viewItem View item to convert. | ||
* @returns {String} Plain text representation of `viewItem`. | ||
* @param viewItem View item to convert. | ||
* @returns Plain text representation of `viewItem`. | ||
*/ | ||
@@ -16,0 +16,0 @@ export default function viewToPlainText(viewItem) { |
Sorry, the diff of this file is not supported yet
72053
1263
+ Added@ckeditor/ckeditor5-core@36.0.1(transitive)
+ Added@ckeditor/ckeditor5-engine@36.0.1(transitive)
+ Added@ckeditor/ckeditor5-enter@36.0.1(transitive)
+ Added@ckeditor/ckeditor5-typing@36.0.1(transitive)
+ Added@ckeditor/ckeditor5-ui@36.0.1(transitive)
+ Added@ckeditor/ckeditor5-utils@36.0.1(transitive)
+ Added@ckeditor/ckeditor5-widget@36.0.1(transitive)
- Removed@ckeditor/ckeditor5-core@35.4.0(transitive)
- Removed@ckeditor/ckeditor5-engine@35.4.0(transitive)
- Removed@ckeditor/ckeditor5-enter@35.4.0(transitive)
- Removed@ckeditor/ckeditor5-typing@35.4.0(transitive)
- Removed@ckeditor/ckeditor5-ui@35.4.0(transitive)
- Removed@ckeditor/ckeditor5-utils@35.4.0(transitive)
- Removed@ckeditor/ckeditor5-widget@35.4.0(transitive)