@atlaskit/editor-core 189.0.14 → 189.1.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.
Files changed (118) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/extensibility.js +4 -4
  3. package/dist/cjs/plugins/annotation/commands/index.js +51 -43
  4. package/dist/cjs/plugins/annotation/commands/transform.js +43 -33
  5. package/dist/cjs/plugins/annotation/index.js +12 -5
  6. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +17 -13
  7. package/dist/cjs/plugins/annotation/pm-plugins/keymap.js +2 -2
  8. package/dist/cjs/plugins/annotation/toolbar.js +41 -39
  9. package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +4 -3
  10. package/dist/cjs/plugins/index.js +0 -14
  11. package/dist/cjs/plugins/placeholder-text/index.js +8 -1
  12. package/dist/cjs/plugins/placeholder-text/plugin.js +2 -1
  13. package/dist/cjs/plugins/placeholder-text/styles.js +1 -1
  14. package/dist/cjs/presets/default.js +1 -2
  15. package/dist/cjs/presets/universal.js +2 -1
  16. package/dist/cjs/ui/ContentStyles/index.js +7 -8
  17. package/dist/cjs/utils/document.js +0 -26
  18. package/dist/cjs/utils/index.js +0 -4
  19. package/dist/cjs/version-wrapper.js +1 -1
  20. package/dist/es2019/extensibility.js +1 -1
  21. package/dist/es2019/plugins/annotation/commands/index.js +8 -8
  22. package/dist/es2019/plugins/annotation/commands/transform.js +13 -11
  23. package/dist/es2019/plugins/annotation/index.js +12 -5
  24. package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +10 -10
  25. package/dist/es2019/plugins/annotation/pm-plugins/keymap.js +2 -2
  26. package/dist/es2019/plugins/annotation/toolbar.js +2 -2
  27. package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +4 -3
  28. package/dist/es2019/plugins/index.js +0 -2
  29. package/dist/es2019/plugins/placeholder-text/index.js +2 -1
  30. package/dist/es2019/plugins/placeholder-text/plugin.js +2 -1
  31. package/dist/es2019/plugins/placeholder-text/styles.js +24 -1
  32. package/dist/es2019/presets/default.js +1 -2
  33. package/dist/es2019/presets/universal.js +3 -2
  34. package/dist/es2019/ui/ContentStyles/index.js +0 -2
  35. package/dist/es2019/utils/document.js +0 -25
  36. package/dist/es2019/utils/index.js +0 -4
  37. package/dist/es2019/version-wrapper.js +1 -1
  38. package/dist/esm/extensibility.js +1 -1
  39. package/dist/esm/plugins/annotation/commands/index.js +51 -43
  40. package/dist/esm/plugins/annotation/commands/transform.js +40 -30
  41. package/dist/esm/plugins/annotation/index.js +12 -5
  42. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +17 -13
  43. package/dist/esm/plugins/annotation/pm-plugins/keymap.js +2 -2
  44. package/dist/esm/plugins/annotation/toolbar.js +41 -39
  45. package/dist/esm/plugins/annotation/ui/InlineCommentView.js +4 -3
  46. package/dist/esm/plugins/index.js +0 -2
  47. package/dist/esm/plugins/placeholder-text/index.js +2 -1
  48. package/dist/esm/plugins/placeholder-text/plugin.js +2 -1
  49. package/dist/esm/plugins/placeholder-text/styles.js +2 -2
  50. package/dist/esm/presets/default.js +1 -2
  51. package/dist/esm/presets/universal.js +3 -2
  52. package/dist/esm/ui/ContentStyles/index.js +2 -3
  53. package/dist/esm/utils/document.js +0 -24
  54. package/dist/esm/utils/index.js +0 -4
  55. package/dist/esm/version-wrapper.js +1 -1
  56. package/dist/types/extensibility.d.ts +1 -1
  57. package/dist/types/plugins/annotation/commands/index.d.ts +5 -4
  58. package/dist/types/plugins/annotation/commands/transform.d.ts +5 -4
  59. package/dist/types/plugins/annotation/index.d.ts +5 -2
  60. package/dist/types/plugins/annotation/pm-plugins/keymap.d.ts +2 -1
  61. package/dist/types/plugins/annotation/pm-plugins/types.d.ts +2 -0
  62. package/dist/types/plugins/annotation/toolbar.d.ts +2 -1
  63. package/dist/types/plugins/annotation/ui/InlineCommentView.d.ts +3 -1
  64. package/dist/types/plugins/index.d.ts +0 -2
  65. package/dist/types/plugins/placeholder-text/index.d.ts +1 -0
  66. package/dist/types/plugins/placeholder-text/types.d.ts +4 -1
  67. package/dist/types/presets/default.d.ts +4 -4
  68. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  69. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  70. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  71. package/dist/types/utils/document.d.ts +0 -11
  72. package/dist/types-ts4.5/extensibility.d.ts +1 -1
  73. package/dist/types-ts4.5/plugins/annotation/commands/index.d.ts +5 -4
  74. package/dist/types-ts4.5/plugins/annotation/commands/transform.d.ts +5 -4
  75. package/dist/types-ts4.5/plugins/annotation/index.d.ts +7 -2
  76. package/dist/types-ts4.5/plugins/annotation/pm-plugins/keymap.d.ts +2 -1
  77. package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +2 -0
  78. package/dist/types-ts4.5/plugins/annotation/toolbar.d.ts +2 -1
  79. package/dist/types-ts4.5/plugins/annotation/ui/InlineCommentView.d.ts +3 -1
  80. package/dist/types-ts4.5/plugins/index.d.ts +0 -2
  81. package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +1 -0
  82. package/dist/types-ts4.5/plugins/placeholder-text/types.d.ts +1 -1
  83. package/dist/types-ts4.5/presets/default.d.ts +0 -4
  84. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  85. package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  86. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  87. package/dist/types-ts4.5/utils/document.d.ts +0 -11
  88. package/package.json +4 -3
  89. package/dist/cjs/plugins/fake-text-cursor/index.js +0 -32
  90. package/dist/cjs/plugins/fake-text-cursor/styles.js +0 -12
  91. package/dist/cjs/plugins/fragment/index.js +0 -29
  92. package/dist/cjs/plugins/fragment/plugin-key.js +0 -8
  93. package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +0 -143
  94. package/dist/es2019/plugins/fake-text-cursor/index.js +0 -20
  95. package/dist/es2019/plugins/fake-text-cursor/styles.js +0 -26
  96. package/dist/es2019/plugins/fragment/index.js +0 -20
  97. package/dist/es2019/plugins/fragment/plugin-key.js +0 -2
  98. package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +0 -113
  99. package/dist/esm/plugins/fake-text-cursor/index.js +0 -26
  100. package/dist/esm/plugins/fake-text-cursor/styles.js +0 -5
  101. package/dist/esm/plugins/fragment/index.js +0 -23
  102. package/dist/esm/plugins/fragment/plugin-key.js +0 -2
  103. package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +0 -137
  104. package/dist/types/plugins/fake-text-cursor/index.d.ts +0 -7
  105. package/dist/types/plugins/fake-text-cursor/styles.d.ts +0 -1
  106. package/dist/types/plugins/fragment/index.d.ts +0 -3
  107. package/dist/types/plugins/fragment/plugin-key.d.ts +0 -2
  108. package/dist/types/plugins/fragment/pm-plugins/fragment-consistency.d.ts +0 -15
  109. package/dist/types-ts4.5/plugins/fake-text-cursor/index.d.ts +0 -7
  110. package/dist/types-ts4.5/plugins/fake-text-cursor/styles.d.ts +0 -1
  111. package/dist/types-ts4.5/plugins/fragment/index.d.ts +0 -3
  112. package/dist/types-ts4.5/plugins/fragment/plugin-key.d.ts +0 -2
  113. package/dist/types-ts4.5/plugins/fragment/pm-plugins/fragment-consistency.d.ts +0 -15
  114. /package/dist/cjs/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.js +0 -0
  115. /package/dist/es2019/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.js +0 -0
  116. /package/dist/esm/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.js +0 -0
  117. /package/dist/types/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.d.ts +0 -0
  118. /package/dist/types-ts4.5/plugins/{fake-text-cursor → placeholder-text/fake-text-cursor}/cursor.d.ts +0 -0
@@ -1,5 +1,4 @@
1
1
  import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
2
- import { FakeTextCursorSelection } from '../plugins/fake-text-cursor/cursor';
3
2
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
3
  export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
5
4
  export { insideTable } from '@atlaskit/editor-common/core-utils';
@@ -24,9 +23,6 @@ export function getCursor(selection) {
24
23
  * allowed.
25
24
  */
26
25
  export function isMarkTypeAllowedInCurrentSelection(markType, state) {
27
- if (state.selection instanceof FakeTextCursorSelection) {
28
- return true;
29
- }
30
26
  if (!isMarkTypeAllowedInNode(markType, state)) {
31
27
  return false;
32
28
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "189.0.14";
2
+ export const version = "189.1.1";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,4 +1,4 @@
1
- export { getChangedNodes } from './utils/document';
1
+ export { getChangedNodes } from '@atlaskit/editor-common/utils';
2
2
  export { validateNodes } from './utils/nodes';
3
3
  export { toJSON } from './utils';
4
4
  export { default as Extension } from './plugins/extension/ui/Extension';
@@ -6,18 +6,20 @@ import { isSelectionValid, getPluginState } from '../utils';
6
6
  import { ACTIONS } from '../pm-plugins/types';
7
7
  import transform from './transform';
8
8
  import { AnnotationSelectionType } from '../types';
9
- export var updateInlineCommentResolvedState = function updateInlineCommentResolvedState(partialNewState, resolveMethod) {
10
- var command = {
11
- type: ACTIONS.UPDATE_INLINE_COMMENT_STATE,
12
- data: partialNewState
9
+ export var updateInlineCommentResolvedState = function updateInlineCommentResolvedState(editorAnalyticsAPI) {
10
+ return function (partialNewState, resolveMethod) {
11
+ var command = {
12
+ type: ACTIONS.UPDATE_INLINE_COMMENT_STATE,
13
+ data: partialNewState
14
+ };
15
+ var allResolved = Object.values(partialNewState).every(function (state) {
16
+ return state;
17
+ });
18
+ if (resolveMethod && allResolved) {
19
+ return createCommand(command, transform.addResolveAnalytics(editorAnalyticsAPI)(resolveMethod));
20
+ }
21
+ return createCommand(command);
13
22
  };
14
- var allResolved = Object.values(partialNewState).every(function (state) {
15
- return state;
16
- });
17
- if (resolveMethod && allResolved) {
18
- return createCommand(command, transform.addResolveAnalytics(resolveMethod));
19
- }
20
- return createCommand(command);
21
23
  };
22
24
  export var closeComponent = function closeComponent() {
23
25
  return createCommand({
@@ -67,29 +69,33 @@ var getDraftCommandAction = function getDraftCommandAction(drafting) {
67
69
  };
68
70
  };
69
71
  };
70
- export var setInlineCommentDraftState = function setInlineCommentDraftState(drafting) {
71
- var inputMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INPUT_METHOD.TOOLBAR;
72
- var commandAction = getDraftCommandAction(drafting);
73
- return createCommand(commandAction, transform.addOpenCloseAnalytics(drafting, inputMethod));
72
+ export var setInlineCommentDraftState = function setInlineCommentDraftState(editorAnalyticsAPI) {
73
+ return function (drafting) {
74
+ var inputMethod = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INPUT_METHOD.TOOLBAR;
75
+ var commandAction = getDraftCommandAction(drafting);
76
+ return createCommand(commandAction, transform.addOpenCloseAnalytics(editorAnalyticsAPI)(drafting, inputMethod));
77
+ };
74
78
  };
75
- export var addInlineComment = function addInlineComment(id) {
76
- var commandAction = function commandAction(editorState) {
77
- return {
78
- type: ACTIONS.ADD_INLINE_COMMENT,
79
- data: {
80
- drafting: false,
81
- inlineComments: _defineProperty({}, id, false),
82
- // Auto make the newly inserted comment selected.
83
- // We move the selection to the head of the comment selection.
84
- selectedAnnotations: [{
85
- id: id,
86
- type: AnnotationTypes.INLINE_COMMENT
87
- }],
88
- editorState: editorState
89
- }
79
+ export var addInlineComment = function addInlineComment(editorAnalyticsAPI) {
80
+ return function (id) {
81
+ var commandAction = function commandAction(editorState) {
82
+ return {
83
+ type: ACTIONS.ADD_INLINE_COMMENT,
84
+ data: {
85
+ drafting: false,
86
+ inlineComments: _defineProperty({}, id, false),
87
+ // Auto make the newly inserted comment selected.
88
+ // We move the selection to the head of the comment selection.
89
+ selectedAnnotations: [{
90
+ id: id,
91
+ type: AnnotationTypes.INLINE_COMMENT
92
+ }],
93
+ editorState: editorState
94
+ }
95
+ };
90
96
  };
97
+ return createCommand(commandAction, transform.addInlineComment(editorAnalyticsAPI)(id));
91
98
  };
92
- return createCommand(commandAction, transform.addInlineComment(id));
93
99
  };
94
100
  export var updateMouseState = function updateMouseState(mouseData) {
95
101
  return createCommand({
@@ -110,19 +116,21 @@ export var setSelectedAnnotation = function setSelectedAnnotation(id) {
110
116
  }
111
117
  });
112
118
  };
113
- export var createAnnotation = function createAnnotation(id) {
114
- var annotationType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : AnnotationTypes.INLINE_COMMENT;
115
- return function (state, dispatch) {
116
- // don't try to add if there are is no temp highlight bookmarked
117
- var _ref = getPluginState(state) || {},
118
- bookmark = _ref.bookmark;
119
- if (!bookmark || !dispatch) {
119
+ export var createAnnotation = function createAnnotation(editorAnalyticsAPI) {
120
+ return function (id) {
121
+ var annotationType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : AnnotationTypes.INLINE_COMMENT;
122
+ return function (state, dispatch) {
123
+ // don't try to add if there are is no temp highlight bookmarked
124
+ var _ref = getPluginState(state) || {},
125
+ bookmark = _ref.bookmark;
126
+ if (!bookmark || !dispatch) {
127
+ return false;
128
+ }
129
+ if (annotationType === AnnotationTypes.INLINE_COMMENT) {
130
+ return addInlineComment(editorAnalyticsAPI)(id)(state, dispatch);
131
+ }
120
132
  return false;
121
- }
122
- if (annotationType === AnnotationTypes.INLINE_COMMENT) {
123
- return addInlineComment(id)(state, dispatch);
124
- }
125
- return false;
133
+ };
126
134
  };
127
135
  };
128
136
  export var setInlineCommentsVisibility = function setInlineCommentsVisibility(isVisible) {
@@ -1,7 +1,6 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { AnnotationTypes } from '@atlaskit/adf-schema';
3
3
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
- import { addAnalytics } from '../../analytics/utils';
5
4
  import { getSelectionPositions, getPluginState, getDraftCommandAnalyticsPayload } from '../utils';
6
5
  import { applyMarkOnRange } from '@atlaskit/editor-common/mark';
7
6
  var addAnnotationMark = function addAnnotationMark(id) {
@@ -22,43 +21,54 @@ var addAnnotationMark = function addAnnotationMark(id) {
22
21
  return tr;
23
22
  };
24
23
  };
25
- var addInlineComment = function addInlineComment(id) {
26
- return function (transaction, state) {
27
- var tr = addAnnotationMark(id)(transaction, state);
28
- // add insert analytics step to transaction
29
- tr = addInsertAnalytics(tr, state);
30
- // add close analytics step to transaction
31
- tr = addOpenCloseAnalytics(false, INPUT_METHOD.TOOLBAR)(tr, state);
32
- return tr;
24
+ var addInlineComment = function addInlineComment(editorAnalyticsAPI) {
25
+ return function (id) {
26
+ return function (transaction, state) {
27
+ var tr = addAnnotationMark(id)(transaction, state);
28
+ // add insert analytics step to transaction
29
+ tr = addInsertAnalytics(editorAnalyticsAPI)(tr, state);
30
+ // add close analytics step to transaction
31
+ tr = addOpenCloseAnalytics(editorAnalyticsAPI)(false, INPUT_METHOD.TOOLBAR)(tr, state);
32
+ return tr;
33
+ };
33
34
  };
34
35
  };
35
- var addOpenCloseAnalytics = function addOpenCloseAnalytics(drafting) {
36
- var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INPUT_METHOD.TOOLBAR;
37
- return function (transaction, state) {
38
- var draftingPayload = getDraftCommandAnalyticsPayload(drafting, method)(state);
39
- return addAnalytics(state, transaction, draftingPayload);
36
+ var addOpenCloseAnalytics = function addOpenCloseAnalytics(editorAnalyticsAPI) {
37
+ return function (drafting) {
38
+ var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INPUT_METHOD.TOOLBAR;
39
+ return function (transaction, state) {
40
+ var draftingPayload = getDraftCommandAnalyticsPayload(drafting, method)(state);
41
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(draftingPayload)(transaction);
42
+ return transaction;
43
+ };
40
44
  };
41
45
  };
42
- var addInsertAnalytics = function addInsertAnalytics(transaction, state) {
43
- return addAnalytics(state, transaction, {
44
- action: ACTION.INSERTED,
45
- actionSubject: ACTION_SUBJECT.ANNOTATION,
46
- eventType: EVENT_TYPE.TRACK,
47
- actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT
48
- });
49
- };
50
- var addResolveAnalytics = function addResolveAnalytics(method) {
46
+ var addInsertAnalytics = function addInsertAnalytics(editorAnalyticsAPI) {
51
47
  return function (transaction, state) {
52
- var resolvedPayload = {
53
- action: ACTION.RESOLVED,
48
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent({
49
+ action: ACTION.INSERTED,
54
50
  actionSubject: ACTION_SUBJECT.ANNOTATION,
55
- actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
56
51
  eventType: EVENT_TYPE.TRACK,
57
- attributes: {
58
- method: method
59
- }
52
+ actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT
53
+ })(transaction);
54
+ return transaction;
55
+ };
56
+ };
57
+ var addResolveAnalytics = function addResolveAnalytics(editorAnalyticsAPI) {
58
+ return function (method) {
59
+ return function (transaction, state) {
60
+ var resolvedPayload = {
61
+ action: ACTION.RESOLVED,
62
+ actionSubject: ACTION_SUBJECT.ANNOTATION,
63
+ actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
64
+ eventType: EVENT_TYPE.TRACK,
65
+ attributes: {
66
+ method: method
67
+ }
68
+ };
69
+ editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(resolvedPayload)(transaction);
70
+ return transaction;
60
71
  };
61
- return addAnalytics(state, transaction, resolvedPayload);
62
72
  };
63
73
  };
64
74
  export default {
@@ -33,11 +33,13 @@ var annotationPlugin = function annotationPlugin(_ref) {
33
33
  portalProviderAPI = _ref2.portalProviderAPI,
34
34
  eventDispatcher = _ref2.eventDispatcher;
35
35
  if (annotationProviders) {
36
+ var _api$analytics;
36
37
  return inlineCommentPlugin({
37
38
  dispatch: dispatch,
38
39
  portalProviderAPI: portalProviderAPI,
39
40
  eventDispatcher: eventDispatcher,
40
- provider: annotationProviders.inlineComment
41
+ provider: annotationProviders.inlineComment,
42
+ editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions
41
43
  });
42
44
  }
43
45
  return;
@@ -46,7 +48,8 @@ var annotationPlugin = function annotationPlugin(_ref) {
46
48
  name: 'annotationKeymap',
47
49
  plugin: function plugin() {
48
50
  if (annotationProviders) {
49
- return keymapPlugin();
51
+ var _api$analytics2;
52
+ return keymapPlugin(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions);
50
53
  }
51
54
  return;
52
55
  }
@@ -59,8 +62,9 @@ var annotationPlugin = function annotationPlugin(_ref) {
59
62
  }
60
63
  var pluginState = getPluginState(state);
61
64
  if (pluginState && pluginState.isVisible && !pluginState.bookmark && !pluginState.mouseData.isSelecting) {
65
+ var _api$analytics3;
62
66
  var isToolbarAbove = annotationProviders.inlineComment.isToolbarAbove;
63
- return buildToolbar(state, intl, isToolbarAbove);
67
+ return buildToolbar(api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions)(state, intl, isToolbarAbove);
64
68
  }
65
69
  },
66
70
  selectionToolbar: function selectionToolbar(state, intl) {
@@ -69,8 +73,9 @@ var annotationPlugin = function annotationPlugin(_ref) {
69
73
  }
70
74
  var pluginState = getPluginState(state);
71
75
  if (pluginState && pluginState.isVisible && !pluginState.bookmark && !pluginState.mouseData.isSelecting) {
76
+ var _api$analytics4;
72
77
  var isToolbarAbove = annotationProviders.inlineComment.isToolbarAbove;
73
- return buildToolbar(state, intl, isToolbarAbove);
78
+ return buildToolbar(api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions)(state, intl, isToolbarAbove);
74
79
  }
75
80
  }
76
81
  },
@@ -90,6 +95,7 @@ var annotationPlugin = function annotationPlugin(_ref) {
90
95
  };
91
96
  };
92
97
  function AnnotationContentComponent(_ref4) {
98
+ var _api$analytics5;
93
99
  var api = _ref4.api,
94
100
  editorView = _ref4.editorView,
95
101
  annotationProviders = _ref4.annotationProviders,
@@ -104,7 +110,8 @@ function AnnotationContentComponent(_ref4) {
104
110
  }, /*#__PURE__*/React.createElement(InlineCommentView, {
105
111
  providers: annotationProviders,
106
112
  editorView: editorView,
107
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
113
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
114
+ editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions
108
115
  }));
109
116
  }
110
117
  export default annotationPlugin;
@@ -40,7 +40,7 @@ var fetchProviderStates = /*#__PURE__*/function () {
40
40
  // fetchState is unable to return a command as it's runs async and may dispatch at a later time
41
41
  // Requires `editorView` instead of the decomposition as the async means state may end up stale
42
42
  var fetchState = /*#__PURE__*/function () {
43
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(provider, annotationIds, editorView) {
43
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(provider, annotationIds, editorView, editorAnalyticsAPI) {
44
44
  var inlineCommentStates;
45
45
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
46
46
  while (1) switch (_context2.prev = _context2.next) {
@@ -56,7 +56,7 @@ var fetchState = /*#__PURE__*/function () {
56
56
  case 4:
57
57
  inlineCommentStates = _context2.sent;
58
58
  if (editorView.dispatch) {
59
- updateInlineCommentResolvedState(inlineCommentStates)(editorView.state, editorView.dispatch);
59
+ updateInlineCommentResolvedState(editorAnalyticsAPI)(inlineCommentStates)(editorView.state, editorView.dispatch);
60
60
  }
61
61
  case 6:
62
62
  case "end":
@@ -64,7 +64,7 @@ var fetchState = /*#__PURE__*/function () {
64
64
  }
65
65
  }, _callee2);
66
66
  }));
67
- return function fetchState(_x3, _x4, _x5) {
67
+ return function fetchState(_x3, _x4, _x5, _x6) {
68
68
  return _ref2.apply(this, arguments);
69
69
  };
70
70
  }();
@@ -90,14 +90,18 @@ var hideToolbar = function hideToolbar(state, dispatch) {
90
90
  };
91
91
 
92
92
  // Subscribe to updates from consumer
93
- var onResolve = function onResolve(state, dispatch) {
94
- return function (annotationId) {
95
- updateInlineCommentResolvedState(_defineProperty({}, annotationId, true), RESOLVE_METHOD.CONSUMER)(state, dispatch);
93
+ var onResolve = function onResolve(editorAnalyticsAPI) {
94
+ return function (state, dispatch) {
95
+ return function (annotationId) {
96
+ updateInlineCommentResolvedState(editorAnalyticsAPI)(_defineProperty({}, annotationId, true), RESOLVE_METHOD.CONSUMER)(state, dispatch);
97
+ };
96
98
  };
97
99
  };
98
- var onUnResolve = function onUnResolve(state, dispatch) {
99
- return function (annotationId) {
100
- updateInlineCommentResolvedState(_defineProperty({}, annotationId, false))(state, dispatch);
100
+ var onUnResolve = function onUnResolve(editorAnalyticsAPI) {
101
+ return function (state, dispatch) {
102
+ return function (annotationId) {
103
+ updateInlineCommentResolvedState(editorAnalyticsAPI)(_defineProperty({}, annotationId, false))(state, dispatch);
104
+ };
101
105
  };
102
106
  };
103
107
  var onMouseUp = function onMouseUp(state, dispatch) {
@@ -135,12 +139,12 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
135
139
  view: function view(editorView) {
136
140
  // Get initial state
137
141
  // Need to pass `editorView` to mitigate editor state going stale
138
- fetchState(provider, getAllAnnotations(editorView.state.doc), editorView);
142
+ fetchState(provider, getAllAnnotations(editorView.state.doc), editorView, options.editorAnalyticsAPI);
139
143
  var resolve = function resolve(annotationId) {
140
- return onResolve(editorView.state, editorView.dispatch)(annotationId);
144
+ return onResolve(options.editorAnalyticsAPI)(editorView.state, editorView.dispatch)(annotationId);
141
145
  };
142
146
  var unResolve = function unResolve(annotationId) {
143
- return onUnResolve(editorView.state, editorView.dispatch)(annotationId);
147
+ return onUnResolve(options.editorAnalyticsAPI)(editorView.state, editorView.dispatch)(annotationId);
144
148
  };
145
149
  var mouseUp = function mouseUp(event) {
146
150
  return onMouseUp(editorView.state, editorView.dispatch)(event);
@@ -168,7 +172,7 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
168
172
  return;
169
173
  }
170
174
  clearDirtyMark()(view.state, view.dispatch);
171
- fetchState(provider, getAllAnnotations(view.state.doc), view);
175
+ fetchState(provider, getAllAnnotations(view.state.doc), view, options.editorAnalyticsAPI);
172
176
  },
173
177
  destroy: function destroy() {
174
178
  editorView.root.removeEventListener('mouseup', mouseUp);
@@ -2,8 +2,8 @@ import { keymap } from '@atlaskit/editor-prosemirror/keymap';
2
2
  import { bindKeymapWithCommand, addInlineComment } from '../../../keymaps';
3
3
  import { setInlineCommentDraftState } from '../commands';
4
4
  import { INPUT_METHOD } from '../../analytics';
5
- export function keymapPlugin() {
5
+ export function keymapPlugin(editorAnalyticsAPI) {
6
6
  var list = {};
7
- bindKeymapWithCommand(addInlineComment.common, setInlineCommentDraftState(true, INPUT_METHOD.SHORTCUT), list);
7
+ bindKeymapWithCommand(addInlineComment.common, setInlineCommentDraftState(editorAnalyticsAPI)(true, INPUT_METHOD.SHORTCUT), list);
8
8
  return keymap(list);
9
9
  }
@@ -6,45 +6,47 @@ import { AnnotationTestIds, AnnotationSelectionType } from './types';
6
6
  import { isSelectionValid } from './utils';
7
7
  import { annotationMessages } from '@atlaskit/editor-common/messages';
8
8
  import { calculateToolbarPositionAboveSelection, calculateToolbarPositionTrackHead } from '@atlaskit/editor-common/utils';
9
- export var buildToolbar = function buildToolbar(state, intl) {
10
- var isToolbarAbove = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
11
- var schema = state.schema;
12
- var selectionValid = isSelectionValid(state);
13
- if (selectionValid === AnnotationSelectionType.INVALID) {
14
- return undefined;
15
- }
16
- var createCommentMessage = intl.formatMessage(annotationMessages.createComment);
17
- var commentDisabledMessage = intl.formatMessage(annotationMessages.createCommentInvalid);
18
- var createComment = {
19
- type: 'button',
20
- showTitle: true,
21
- disabled: selectionValid === AnnotationSelectionType.DISABLED,
22
- testId: AnnotationTestIds.floatingToolbarCreateButton,
23
- icon: CommentIcon,
24
- tooltipContent: selectionValid === AnnotationSelectionType.DISABLED ? commentDisabledMessage : /*#__PURE__*/React.createElement(ToolTipContent, {
25
- description: createCommentMessage,
26
- keymap: addInlineComment
27
- }),
28
- title: createCommentMessage,
29
- onClick: function onClick(state, dispatch) {
30
- return setInlineCommentDraftState(true)(state, dispatch);
9
+ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
10
+ return function (state, intl) {
11
+ var isToolbarAbove = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
12
+ var schema = state.schema;
13
+ var selectionValid = isSelectionValid(state);
14
+ if (selectionValid === AnnotationSelectionType.INVALID) {
15
+ return undefined;
31
16
  }
32
- };
33
- var annotation = schema.marks.annotation;
34
- var validNodes = Object.keys(schema.nodes).reduce(function (acc, current) {
35
- var type = schema.nodes[current];
36
- if (type.allowsMarkType(annotation)) {
37
- acc.push(type);
38
- }
39
- return acc;
40
- }, []);
41
- var toolbarTitle = intl.formatMessage(annotationMessages.toolbar);
42
- var calcToolbarPosition = isToolbarAbove ? calculateToolbarPositionAboveSelection : calculateToolbarPositionTrackHead;
43
- var onPositionCalculated = calcToolbarPosition(toolbarTitle);
44
- return {
45
- title: toolbarTitle,
46
- nodeType: validNodes,
47
- items: [createComment],
48
- onPositionCalculated: onPositionCalculated
17
+ var createCommentMessage = intl.formatMessage(annotationMessages.createComment);
18
+ var commentDisabledMessage = intl.formatMessage(annotationMessages.createCommentInvalid);
19
+ var createComment = {
20
+ type: 'button',
21
+ showTitle: true,
22
+ disabled: selectionValid === AnnotationSelectionType.DISABLED,
23
+ testId: AnnotationTestIds.floatingToolbarCreateButton,
24
+ icon: CommentIcon,
25
+ tooltipContent: selectionValid === AnnotationSelectionType.DISABLED ? commentDisabledMessage : /*#__PURE__*/React.createElement(ToolTipContent, {
26
+ description: createCommentMessage,
27
+ keymap: addInlineComment
28
+ }),
29
+ title: createCommentMessage,
30
+ onClick: function onClick(state, dispatch) {
31
+ return setInlineCommentDraftState(editorAnalyticsAPI)(true)(state, dispatch);
32
+ }
33
+ };
34
+ var annotation = schema.marks.annotation;
35
+ var validNodes = Object.keys(schema.nodes).reduce(function (acc, current) {
36
+ var type = schema.nodes[current];
37
+ if (type.allowsMarkType(annotation)) {
38
+ acc.push(type);
39
+ }
40
+ return acc;
41
+ }, []);
42
+ var toolbarTitle = intl.formatMessage(annotationMessages.toolbar);
43
+ var calcToolbarPosition = isToolbarAbove ? calculateToolbarPositionAboveSelection : calculateToolbarPositionTrackHead;
44
+ var onPositionCalculated = calcToolbarPosition(toolbarTitle);
45
+ return {
46
+ title: toolbarTitle,
47
+ nodeType: validNodes,
48
+ items: [createComment],
49
+ onPositionCalculated: onPositionCalculated
50
+ };
49
51
  };
50
52
  };
@@ -27,6 +27,7 @@ var findPosForDOM = function findPosForDOM(sel) {
27
27
  export function InlineCommentView(_ref) {
28
28
  var providers = _ref.providers,
29
29
  editorView = _ref.editorView,
30
+ editorAnalyticsAPI = _ref.editorAnalyticsAPI,
30
31
  dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
31
32
  // As inlineComment is the only annotation present, this function is not generic
32
33
  var inlineCommentProvider = providers.inlineComment;
@@ -86,11 +87,11 @@ export function InlineCommentView(_ref) {
86
87
  dom: dom,
87
88
  textSelection: textSelection,
88
89
  onCreate: function onCreate(id) {
89
- createAnnotation(id)(editorView.state, editorView.dispatch);
90
+ createAnnotation(editorAnalyticsAPI)(id)(editorView.state, editorView.dispatch);
90
91
  !editorView.hasFocus() && editorView.focus();
91
92
  },
92
93
  onClose: function onClose() {
93
- setInlineCommentDraftState(false)(editorView.state, editorView.dispatch);
94
+ setInlineCommentDraftState(editorAnalyticsAPI)(false)(editorView.state, editorView.dispatch);
94
95
  !editorView.hasFocus() && editorView.focus();
95
96
  }
96
97
  }));
@@ -135,7 +136,7 @@ export function InlineCommentView(_ref) {
135
136
  return removeInlineCommentNearSelection(id)(state, dispatch);
136
137
  },
137
138
  onResolve: function onResolve(id) {
138
- return updateInlineCommentResolvedState(_defineProperty({}, id, true), RESOLVE_METHOD.COMPONENT)(editorView.state, editorView.dispatch);
139
+ return updateInlineCommentResolvedState(editorAnalyticsAPI)(_defineProperty({}, id, true), RESOLVE_METHOD.COMPONENT)(editorView.state, editorView.dispatch);
139
140
  },
140
141
  onClose: function onClose() {
141
142
  closeComponent()(editorView.state, editorView.dispatch);
@@ -2,7 +2,6 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
2
2
  export { default as codeBlockPlugin } from './code-block';
3
3
  export { default as collabEditPlugin } from './collab-edit';
4
4
  export { default as extensionPlugin } from './extension';
5
- export { default as fakeTextCursorPlugin } from './fake-text-cursor';
6
5
  export { default as insertBlockPlugin } from './insert-block';
7
6
  export { default as jiraIssuePlugin } from './jira-issue';
8
7
  export { default as layoutPlugin } from './layout';
@@ -16,7 +15,6 @@ export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
16
15
  export { default as breakoutPlugin } from './breakout';
17
16
  export { default as alignmentPlugin } from './alignment';
18
17
  export { default as dataConsumerMarkPlugin } from './data-consumer';
19
- export { default as fragmentMarkPlugin } from './fragment';
20
18
  export { default as indentationPlugin } from './indentation';
21
19
  export { default as annotationPlugin } from './annotation';
22
20
  export { default as analyticsPlugin } from './analytics';
@@ -1 +1,2 @@
1
- export { default as placeholderTextPlugin } from './plugin';
1
+ export { default as placeholderTextPlugin } from './plugin';
2
+ export { FakeTextCursorSelection } from './fake-text-cursor/cursor';
@@ -5,7 +5,7 @@ import { placeholder } from '@atlaskit/adf-schema';
5
5
  import MediaServicesTextIcon from '@atlaskit/icon/glyph/media-services/text';
6
6
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
7
7
  import { isNodeEmpty } from '@atlaskit/editor-common/utils';
8
- import { FakeTextCursorSelection } from '../fake-text-cursor/cursor';
8
+ import { drawFakeTextCursor, FakeTextCursorSelection } from './fake-text-cursor/cursor';
9
9
  import PlaceholderFloatingToolbar from './ui/PlaceholderFloatingToolbar';
10
10
  import { hidePlaceholderFloatingToolbar, insertPlaceholderTextAtSelection } from './actions';
11
11
  import { PlaceholderTextNodeView } from './placeholder-text-nodeview';
@@ -92,6 +92,7 @@ export function createPlugin(dispatch, options, api) {
92
92
  return;
93
93
  },
94
94
  props: {
95
+ decorations: drawFakeTextCursor,
95
96
  handleDOMEvents: {
96
97
  beforeinput: function beforeinput(view, event) {
97
98
  var state = view.state;
@@ -1,6 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
3
  import { css } from '@emotion/react';
4
- import { N200 } from '@atlaskit/theme/colors';
4
+ import { B75, N200 } from '@atlaskit/theme/colors';
5
5
  import { SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
- export var placeholderTextStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Background]), "var(--ds-text-subtlest, ".concat(N200, ")"));
6
+ export var placeholderTextStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n\n .ProseMirror {\n .ProseMirror-fake-text-cursor {\n display: inline;\n pointer-events: none;\n position: relative;\n }\n\n .ProseMirror-fake-text-cursor::after {\n content: '';\n display: inline;\n top: 0;\n position: absolute;\n border-right: 1px solid ", ";\n }\n\n .ProseMirror-fake-text-selection {\n display: inline;\n pointer-events: none;\n position: relative;\n background-color: ", ";\n }\n }\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-text-subtlest, ".concat(N200, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Background]), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-border, rgba(0, 0, 0, 0.4))", "var(--ds-background-selected, ".concat(B75, ")"));
@@ -13,7 +13,6 @@ import { focusPlugin } from '@atlaskit/editor-plugin-focus';
13
13
  import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
14
14
  import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
15
15
  import { submitEditorPlugin } from '@atlaskit/editor-plugin-submit-editor';
16
- import fakeTextCursorPlugin from '../plugins/fake-text-cursor';
17
16
  import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
18
17
  import { copyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
19
18
  import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
@@ -82,7 +81,7 @@ export function createDefaultPreset(options) {
82
81
  return builder;
83
82
  }).add([hyperlinkPlugin, options.hyperlinkOptions]).add([textFormattingPlugin, options.textFormatting]).add(widthPlugin).add([quickInsertPlugin, options.quickInsert]).add([typeAheadPlugin, options.typeAhead || {
84
83
  createAnalyticsEvent: options.createAnalyticsEvent
85
- }]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(fakeTextCursorPlugin).add(copyButtonPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
84
+ }]).add([placeholderPlugin, options.placeholder]).add(unsupportedContentPlugin).add(editorDisabledPlugin).add([submitEditorPlugin, options.submitEditor]).add(copyButtonPlugin).add(floatingToolbarPlugin).add([selectionPlugin, options.selection]).add([codeBlockPlugin, options.codeBlock || {
86
85
  appearance: 'full-page'
87
86
  }]);
88
87
  return preset;
@@ -2,7 +2,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
5
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
6
6
  import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
7
7
  import { historyPlugin } from '@atlaskit/editor-plugin-history';
8
8
  import { statusPlugin } from '@atlaskit/editor-plugin-status';
@@ -12,6 +12,7 @@ import { borderPlugin } from '@atlaskit/editor-plugin-border';
12
12
  import { helpDialogPlugin } from '@atlaskit/editor-plugin-help-dialog';
13
13
  import { mediaPlugin } from '@atlaskit/editor-plugin-media';
14
14
  import { rulePlugin } from '@atlaskit/editor-plugin-rule';
15
+ import { fragmentPlugin } from '@atlaskit/editor-plugin-fragment';
15
16
  import { emojiPlugin } from '@atlaskit/editor-plugin-emoji';
16
17
  import { pasteOptionsToolbarPlugin } from '@atlaskit/editor-plugin-paste-options-toolbar';
17
18
  import { listPlugin } from '@atlaskit/editor-plugin-list';
@@ -384,7 +385,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
384
385
  return builder.add(plugin);
385
386
  }
386
387
  return builder;
387
- }).maybeAdd(fragmentMarkPlugin, function (plugin, builder) {
388
+ }).maybeAdd(fragmentPlugin, function (plugin, builder) {
388
389
  if (props.allowFragmentMark) {
389
390
  return builder.add(plugin);
390
391
  }