@atlaskit/editor-plugin-paste 7.4.5 → 7.4.7
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,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 7.4.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a05464ea42678`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a05464ea42678) -
|
|
8
|
+
EDITOR-2791 bump adf-schema
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 7.4.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`b14a5fc14cf22`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b14a5fc14cf22) -
|
|
16
|
+
[ux] EDITOR-2606 copy sync block from renderer should flatten out content instead of creating new
|
|
17
|
+
reference
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 7.4.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -347,6 +347,9 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
347
347
|
event: event,
|
|
348
348
|
text: text
|
|
349
349
|
});
|
|
350
|
+
if ((0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true)) {
|
|
351
|
+
slice = (0, _transforms.transformSyncBlock)(slice, schema, (0, _util.getPasteSource)(event));
|
|
352
|
+
}
|
|
350
353
|
var plainTextPasteSlice = (0, _utils.linkifyContent)(state.schema)(slice);
|
|
351
354
|
if ((0, _analytics2.handlePasteAsPlainTextWithAnalytics)(editorAnalyticsAPI)(view, event, plainTextPasteSlice)(state, dispatch, view)) {
|
|
352
355
|
return true;
|
|
@@ -585,9 +588,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
585
588
|
slice = (0, _transforms.transformSingleColumnLayout)(slice, schema);
|
|
586
589
|
}
|
|
587
590
|
slice = (0, _transforms.transformSliceToRemoveMacroId)(slice, schema);
|
|
588
|
-
if ((0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true)) {
|
|
589
|
-
slice = (0, _transforms.transformToNewReferenceSyncBlock)(slice, schema);
|
|
590
|
-
}
|
|
591
591
|
return slice;
|
|
592
592
|
},
|
|
593
593
|
transformPastedHTML: function transformPastedHTML(html) {
|
|
@@ -8,7 +8,7 @@ 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 { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId,
|
|
11
|
+
import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock } from '@atlaskit/editor-common/transforms';
|
|
12
12
|
import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
|
|
13
13
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
14
14
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -309,6 +309,9 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
309
309
|
event,
|
|
310
310
|
text
|
|
311
311
|
});
|
|
312
|
+
if (expValEquals('platform_synced_block', 'isEnabled', true)) {
|
|
313
|
+
slice = transformSyncBlock(slice, schema, getPasteSource(event));
|
|
314
|
+
}
|
|
312
315
|
const plainTextPasteSlice = linkifyContent(state.schema)(slice);
|
|
313
316
|
if (handlePasteAsPlainTextWithAnalytics(editorAnalyticsAPI)(view, event, plainTextPasteSlice)(state, dispatch, view)) {
|
|
314
317
|
return true;
|
|
@@ -547,9 +550,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
547
550
|
slice = transformSingleColumnLayout(slice, schema);
|
|
548
551
|
}
|
|
549
552
|
slice = transformSliceToRemoveMacroId(slice, schema);
|
|
550
|
-
if (expValEquals('platform_synced_block', 'isEnabled', true)) {
|
|
551
|
-
slice = transformToNewReferenceSyncBlock(slice, schema);
|
|
552
|
-
}
|
|
553
553
|
return slice;
|
|
554
554
|
},
|
|
555
555
|
transformPastedHTML(html) {
|
|
@@ -13,7 +13,7 @@ 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 { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId,
|
|
16
|
+
import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock } from '@atlaskit/editor-common/transforms';
|
|
17
17
|
import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
|
|
18
18
|
import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
19
19
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -339,6 +339,9 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
339
339
|
event: event,
|
|
340
340
|
text: text
|
|
341
341
|
});
|
|
342
|
+
if (expValEquals('platform_synced_block', 'isEnabled', true)) {
|
|
343
|
+
slice = transformSyncBlock(slice, schema, getPasteSource(event));
|
|
344
|
+
}
|
|
342
345
|
var plainTextPasteSlice = linkifyContent(state.schema)(slice);
|
|
343
346
|
if (handlePasteAsPlainTextWithAnalytics(editorAnalyticsAPI)(view, event, plainTextPasteSlice)(state, dispatch, view)) {
|
|
344
347
|
return true;
|
|
@@ -577,9 +580,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
577
580
|
slice = transformSingleColumnLayout(slice, schema);
|
|
578
581
|
}
|
|
579
582
|
slice = transformSliceToRemoveMacroId(slice, schema);
|
|
580
|
-
if (expValEquals('platform_synced_block', 'isEnabled', true)) {
|
|
581
|
-
slice = transformToNewReferenceSyncBlock(slice, schema);
|
|
582
|
-
}
|
|
583
583
|
return slice;
|
|
584
584
|
},
|
|
585
585
|
transformPastedHTML: function transformPastedHTML(html) {
|
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.7",
|
|
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.
|
|
30
|
+
"@atlaskit/adf-schema": "^51.4.0",
|
|
31
31
|
"@atlaskit/code": "^17.3.0",
|
|
32
32
|
"@atlaskit/editor-markdown-transformer": "^5.20.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"uuid": "^3.1.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^110.
|
|
54
|
+
"@atlaskit/editor-common": "^110.32.0",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0"
|
|
57
57
|
},
|