@atlaskit/editor-plugin-paste 2.0.7 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/handlers.js +1 -2
- package/dist/cjs/pm-plugins/main.js +5 -1
- package/dist/es2019/index.js +3 -0
- package/dist/es2019/pm-plugins/main.js +5 -1
- package/dist/esm/handlers.js +1 -2
- package/dist/esm/index.js +3 -0
- package/dist/esm/pm-plugins/main.js +5 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 2.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#164986](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/164986)
|
|
8
|
+
[`a85153a79b5e2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a85153a79b5e2) -
|
|
9
|
+
Added the uiEvent paste meta back into the paste transaction
|
|
10
|
+
|
|
3
11
|
## 2.0.7
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/handlers.js
CHANGED
|
@@ -592,7 +592,6 @@ function handleMacroAutoConvert(text, slice, queueCardsFromChangedTr, runMacroAu
|
|
|
592
592
|
* if FF enabled, run through smart links and check for result
|
|
593
593
|
*/
|
|
594
594
|
if (cardsOptions && cardsOptions.resolveBeforeMacros && cardsOptions.resolveBeforeMacros.length) {
|
|
595
|
-
var _startTrackingPastedM;
|
|
596
595
|
if (cardsOptions.resolveBeforeMacros.indexOf(macro.attrs.extensionKey) < 0) {
|
|
597
596
|
return insertAutoMacro(slice, macro, view);
|
|
598
597
|
}
|
|
@@ -602,7 +601,7 @@ function handleMacroAutoConvert(text, slice, queueCardsFromChangedTr, runMacroAu
|
|
|
602
601
|
var trackingId = (0, _v.default)();
|
|
603
602
|
var trackingFrom = "handleMacroAutoConvert-from-".concat(trackingId);
|
|
604
603
|
var trackingTo = "handleMacroAutoConvert-to-".concat(trackingId);
|
|
605
|
-
(0, _commands.startTrackingPastedMacroPositions)((
|
|
604
|
+
(0, _commands.startTrackingPastedMacroPositions)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, trackingFrom, state.selection.from), trackingTo, state.selection.to))(state, dispatch);
|
|
606
605
|
getSmartLinkAdf(text, 'inline', cardsOptions).then(function () {
|
|
607
606
|
// we use view.state rather than state because state becomes a stale
|
|
608
607
|
// state reference after getSmartLinkAdf's async work
|
|
@@ -268,7 +268,11 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
268
268
|
contentPasted: contentPasted
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
|
-
|
|
271
|
+
|
|
272
|
+
// the handlePaste definition overrides the generic prosemirror behaviour which would previously
|
|
273
|
+
// include a uiEvent meta of paste. To align with the docs (https://prosemirror.net/docs/ref/#state.Transaction)
|
|
274
|
+
// This will re-add the uiEvent meta.
|
|
275
|
+
view.dispatch(tr.setMeta('uiEvent', 'paste'));
|
|
272
276
|
};
|
|
273
277
|
slice = (0, _handlers.handleParagraphBlockMarks)(state, slice);
|
|
274
278
|
var plainTextPasteSlice = (0, _utils.linkifyContent)(state.schema)(slice);
|
package/dist/es2019/index.js
CHANGED
|
@@ -237,7 +237,11 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
237
237
|
contentPasted
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
|
|
241
|
+
// the handlePaste definition overrides the generic prosemirror behaviour which would previously
|
|
242
|
+
// include a uiEvent meta of paste. To align with the docs (https://prosemirror.net/docs/ref/#state.Transaction)
|
|
243
|
+
// This will re-add the uiEvent meta.
|
|
244
|
+
view.dispatch(tr.setMeta('uiEvent', 'paste'));
|
|
241
245
|
};
|
|
242
246
|
slice = handleParagraphBlockMarks(state, slice);
|
|
243
247
|
const plainTextPasteSlice = linkifyContent(state.schema)(slice);
|
package/dist/esm/handlers.js
CHANGED
|
@@ -568,7 +568,6 @@ export function handleMacroAutoConvert(text, slice, queueCardsFromChangedTr, run
|
|
|
568
568
|
* if FF enabled, run through smart links and check for result
|
|
569
569
|
*/
|
|
570
570
|
if (cardsOptions && cardsOptions.resolveBeforeMacros && cardsOptions.resolveBeforeMacros.length) {
|
|
571
|
-
var _startTrackingPastedM;
|
|
572
571
|
if (cardsOptions.resolveBeforeMacros.indexOf(macro.attrs.extensionKey) < 0) {
|
|
573
572
|
return insertAutoMacro(slice, macro, view);
|
|
574
573
|
}
|
|
@@ -578,7 +577,7 @@ export function handleMacroAutoConvert(text, slice, queueCardsFromChangedTr, run
|
|
|
578
577
|
var trackingId = uuid();
|
|
579
578
|
var trackingFrom = "handleMacroAutoConvert-from-".concat(trackingId);
|
|
580
579
|
var trackingTo = "handleMacroAutoConvert-to-".concat(trackingId);
|
|
581
|
-
startTrackingPastedMacroPositions((
|
|
580
|
+
startTrackingPastedMacroPositions(_defineProperty(_defineProperty({}, trackingFrom, state.selection.from), trackingTo, state.selection.to))(state, dispatch);
|
|
582
581
|
getSmartLinkAdf(text, 'inline', cardsOptions).then(function () {
|
|
583
582
|
// we use view.state rather than state because state becomes a stale
|
|
584
583
|
// state reference after getSmartLinkAdf's async work
|
package/dist/esm/index.js
CHANGED
|
@@ -255,7 +255,11 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
255
255
|
contentPasted: contentPasted
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
-
|
|
258
|
+
|
|
259
|
+
// the handlePaste definition overrides the generic prosemirror behaviour which would previously
|
|
260
|
+
// include a uiEvent meta of paste. To align with the docs (https://prosemirror.net/docs/ref/#state.Transaction)
|
|
261
|
+
// This will re-add the uiEvent meta.
|
|
262
|
+
view.dispatch(tr.setMeta('uiEvent', 'paste'));
|
|
259
263
|
};
|
|
260
264
|
slice = handleParagraphBlockMarks(state, slice);
|
|
261
265
|
var plainTextPasteSlice = linkifyContent(state.schema)(slice);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^96.
|
|
34
|
+
"@atlaskit/editor-common": "^96.5.0",
|
|
35
35
|
"@atlaskit/editor-markdown-transformer": "^5.13.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-annotation": "^1.26.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-card": "^4.5.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-list": "^3.9.0",
|
|
42
|
-
"@atlaskit/editor-plugin-media": "^1.
|
|
42
|
+
"@atlaskit/editor-plugin-media": "^1.43.0",
|
|
43
43
|
"@atlaskit/editor-plugin-mentions": "^2.10.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
45
45
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
46
46
|
"@atlaskit/media-client": "^28.5.0",
|
|
47
47
|
"@atlaskit/media-common": "^11.7.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^2.26.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"lodash": "^4.17.21",
|
|
52
52
|
"uuid": "^3.1.0"
|