@atlaskit/editor-plugin-paste 2.2.0 → 2.2.1

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,14 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 2.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#111831](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111831)
8
+ [`66895944dfac9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/66895944dfac9) -
9
+ [ED-26430] Block drag-and-drop of legacy content macro extension
10
+ - Updated dependencies
11
+
3
12
  ## 2.2.0
4
13
 
5
14
  ### Minor Changes
@@ -154,6 +154,13 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
154
154
  // eslint-disable-next-line require-unicode-regexp
155
155
  text = text.replace(/\r/g, '');
156
156
  }
157
+
158
+ // Strip Legacy Content Macro (LCM) extensions on paste
159
+ if (
160
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
161
+ (0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro') && !(0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro_insert')) {
162
+ slice = (0, _transforms.transformSliceToRemoveLegacyContentMacro)(slice, schema);
163
+ }
157
164
  var isPastedFile = (0, _paste.isPastedFile)(event);
158
165
  var isPlainText = text && !html;
159
166
  var isRichText = !!html;
@@ -506,13 +513,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
506
513
  if ((0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_post_fix_patch_2')) {
507
514
  slice = (0, _transforms.transformSingleColumnLayout)(slice, schema);
508
515
  }
509
-
510
- // Strip Legacy Content Macro (LCM) extensions on paste
511
- if (
512
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
513
- (0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro') && !(0, _platformFeatureFlags.fg)('platform_editor_legacy_content_macro_insert')) {
514
- slice = (0, _transforms.transformSliceToRemoveLegacyContentMacro)(slice, schema);
515
- }
516
516
  return slice;
517
517
  },
518
518
  transformPastedHTML: function transformPastedHTML(html) {
@@ -123,6 +123,13 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
123
123
  // eslint-disable-next-line require-unicode-regexp
124
124
  text = text.replace(/\r/g, '');
125
125
  }
126
+
127
+ // Strip Legacy Content Macro (LCM) extensions on paste
128
+ if (
129
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
130
+ fg('platform_editor_legacy_content_macro') && !fg('platform_editor_legacy_content_macro_insert')) {
131
+ slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
132
+ }
126
133
  const isPastedFile = isPastedFileFromEvent(event);
127
134
  const isPlainText = text && !html;
128
135
  const isRichText = !!html;
@@ -480,13 +487,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
480
487
  if (fg('platform_editor_advanced_layouts_post_fix_patch_2')) {
481
488
  slice = transformSingleColumnLayout(slice, schema);
482
489
  }
483
-
484
- // Strip Legacy Content Macro (LCM) extensions on paste
485
- if (
486
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
487
- fg('platform_editor_legacy_content_macro') && !fg('platform_editor_legacy_content_macro_insert')) {
488
- slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
489
- }
490
490
  return slice;
491
491
  },
492
492
  transformPastedHTML(html) {
@@ -146,6 +146,13 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
146
146
  // eslint-disable-next-line require-unicode-regexp
147
147
  text = text.replace(/\r/g, '');
148
148
  }
149
+
150
+ // Strip Legacy Content Macro (LCM) extensions on paste
151
+ if (
152
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
153
+ fg('platform_editor_legacy_content_macro') && !fg('platform_editor_legacy_content_macro_insert')) {
154
+ slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
155
+ }
149
156
  var isPastedFile = isPastedFileFromEvent(event);
150
157
  var isPlainText = text && !html;
151
158
  var isRichText = !!html;
@@ -498,13 +505,6 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
498
505
  if (fg('platform_editor_advanced_layouts_post_fix_patch_2')) {
499
506
  slice = transformSingleColumnLayout(slice, schema);
500
507
  }
501
-
502
- // Strip Legacy Content Macro (LCM) extensions on paste
503
- if (
504
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
505
- fg('platform_editor_legacy_content_macro') && !fg('platform_editor_legacy_content_macro_insert')) {
506
- slice = transformSliceToRemoveLegacyContentMacro(slice, schema);
507
- }
508
508
  return slice;
509
509
  },
510
510
  transformPastedHTML: function transformPastedHTML(html) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
35
  "@atlaskit/code": "^15.6.9",
36
- "@atlaskit/editor-common": "^99.10.0",
36
+ "@atlaskit/editor-common": "^99.12.0",
37
37
  "@atlaskit/editor-markdown-transformer": "^5.15.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^1.12.0",
39
39
  "@atlaskit/editor-plugin-annotation": "^1.28.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/media-client": "^31.1.0",
49
49
  "@atlaskit/media-common": "^11.8.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.0.0",
51
- "@atlaskit/tmp-editor-statsig": "^2.43.0",
51
+ "@atlaskit/tmp-editor-statsig": "^2.45.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "lodash": "^4.17.21",
54
54
  "uuid": "^3.1.0"