@atlaskit/editor-plugin-paste 7.4.15 → 7.4.16
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 7.4.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`79172823f4e47`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/79172823f4e47) -
|
|
8
|
+
[ux] EDITOR-3961 strip breakout mark from renderer sync block html
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 7.4.15
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -18,6 +18,7 @@ var _nesting = require("@atlaskit/editor-common/nesting");
|
|
|
18
18
|
var _paste = require("@atlaskit/editor-common/paste");
|
|
19
19
|
var _measureRender = require("@atlaskit/editor-common/performance/measure-render");
|
|
20
20
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
21
|
+
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
21
22
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
22
23
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
23
24
|
var _editorMarkdownTransformer = require("@atlaskit/editor-markdown-transformer");
|
|
@@ -624,6 +625,12 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
624
625
|
|
|
625
626
|
// Fix for ED-13568: Code blocks being copied/pasted when next to each other get merged
|
|
626
627
|
pastedFromBitBucket = html.indexOf('data-qa="code-line"') >= 0;
|
|
628
|
+
|
|
629
|
+
// Remove breakout marks HTML around sync block renderer nodes
|
|
630
|
+
// so the breakout mark doesn't get applied to the wrong nodes
|
|
631
|
+
if (html.indexOf(_syncBlock.SyncBlockRendererDataAttributeName) >= 0 && (0, _experiments.editorExperiment)('platform_synced_block', true)) {
|
|
632
|
+
html = (0, _transforms.removeBreakoutFromRendererSyncBlockHTML)(html);
|
|
633
|
+
}
|
|
627
634
|
mostRecentPasteEvent = null;
|
|
628
635
|
return html;
|
|
629
636
|
}
|
|
@@ -8,7 +8,8 @@ import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
|
|
|
8
8
|
import { isPastedFile as isPastedFileFromEvent, md } from '@atlaskit/editor-common/paste';
|
|
9
9
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
10
10
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
11
|
-
import {
|
|
11
|
+
import { SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/sync-block';
|
|
12
|
+
import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from '@atlaskit/editor-common/transforms';
|
|
12
13
|
import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
|
|
13
14
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
14
15
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -586,6 +587,12 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
586
587
|
|
|
587
588
|
// Fix for ED-13568: Code blocks being copied/pasted when next to each other get merged
|
|
588
589
|
pastedFromBitBucket = html.indexOf('data-qa="code-line"') >= 0;
|
|
590
|
+
|
|
591
|
+
// Remove breakout marks HTML around sync block renderer nodes
|
|
592
|
+
// so the breakout mark doesn't get applied to the wrong nodes
|
|
593
|
+
if (html.indexOf(SyncBlockRendererDataAttributeName) >= 0 && editorExperiment('platform_synced_block', true)) {
|
|
594
|
+
html = removeBreakoutFromRendererSyncBlockHTML(html);
|
|
595
|
+
}
|
|
589
596
|
mostRecentPasteEvent = null;
|
|
590
597
|
return html;
|
|
591
598
|
}
|
|
@@ -13,7 +13,8 @@ import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
|
|
|
13
13
|
import { isPastedFile as isPastedFileFromEvent, md } from '@atlaskit/editor-common/paste';
|
|
14
14
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
15
15
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
16
|
-
import {
|
|
16
|
+
import { SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/sync-block';
|
|
17
|
+
import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from '@atlaskit/editor-common/transforms';
|
|
17
18
|
import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
|
|
18
19
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
19
20
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -616,6 +617,12 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
616
617
|
|
|
617
618
|
// Fix for ED-13568: Code blocks being copied/pasted when next to each other get merged
|
|
618
619
|
pastedFromBitBucket = html.indexOf('data-qa="code-line"') >= 0;
|
|
620
|
+
|
|
621
|
+
// Remove breakout marks HTML around sync block renderer nodes
|
|
622
|
+
// so the breakout mark doesn't get applied to the wrong nodes
|
|
623
|
+
if (html.indexOf(SyncBlockRendererDataAttributeName) >= 0 && editorExperiment('platform_synced_block', true)) {
|
|
624
|
+
html = removeBreakoutFromRendererSyncBlockHTML(html);
|
|
625
|
+
}
|
|
619
626
|
mostRecentPasteEvent = null;
|
|
620
627
|
return html;
|
|
621
628
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.16",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^51.5.
|
|
30
|
+
"@atlaskit/adf-schema": "^51.5.0",
|
|
31
31
|
"@atlaskit/code": "^17.4.0",
|
|
32
32
|
"@atlaskit/editor-markdown-transformer": "^5.20.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-card": "^11.5.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^5.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-list": "^8.2.0",
|
|
39
|
-
"@atlaskit/editor-plugin-media": "^8.
|
|
39
|
+
"@atlaskit/editor-plugin-media": "^8.7.0",
|
|
40
40
|
"@atlaskit/editor-plugin-mentions": "^8.2.0",
|
|
41
|
-
"@atlaskit/editor-prosemirror": "7.
|
|
41
|
+
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
42
42
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
43
43
|
"@atlaskit/insm": "^0.2.0",
|
|
44
44
|
"@atlaskit/media-client": "^35.7.0",
|
|
45
45
|
"@atlaskit/media-common": "^12.3.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^16.0.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
51
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
52
52
|
"uuid": "^3.1.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^110.
|
|
55
|
+
"@atlaskit/editor-common": "^110.46.0",
|
|
56
56
|
"react": "^18.2.0",
|
|
57
57
|
"react-dom": "^18.2.0"
|
|
58
58
|
},
|