@atlaskit/editor-core 164.0.3 → 166.0.0
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 +43 -0
- package/dist/cjs/actions/index.js +9 -0
- package/dist/cjs/create-editor/ReactEditorView.js +14 -6
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +32 -1
- package/dist/cjs/event-dispatcher/index.js +9 -0
- package/dist/cjs/nodeviews/ReactNodeView.js +1 -11
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/nodeviews/getPerformanceOptions.js +1 -1
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/cjs/plugins/base/utils/input-latency-tracking.js +157 -0
- package/dist/cjs/plugins/card/styles.js +3 -1
- package/dist/cjs/plugins/code-block/styles.js +6 -4
- package/dist/cjs/plugins/collab-edit/plugin-state.js +23 -5
- package/dist/cjs/plugins/date/styles.js +3 -1
- package/dist/cjs/plugins/emoji/index.js +30 -34
- package/dist/cjs/plugins/emoji/nodeviews/emoji.js +12 -66
- package/dist/cjs/plugins/emoji/styles.js +3 -17
- package/dist/cjs/plugins/expand/ui/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +1 -9
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +1 -9
- package/dist/cjs/plugins/layout/styles.js +3 -1
- package/dist/cjs/plugins/list/commands/indent-list.js +5 -1
- package/dist/cjs/plugins/list/commands/outdent-list.js +5 -1
- package/dist/cjs/plugins/list/transforms.js +11 -3
- package/dist/cjs/plugins/media/styles.js +3 -1
- package/dist/cjs/plugins/mentions/index.js +10 -14
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +15 -67
- package/dist/cjs/plugins/mentions/pm-plugins/main.js +19 -10
- package/dist/cjs/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/cjs/plugins/panel/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/cjs/plugins/rule/styles.js +3 -1
- package/dist/cjs/plugins/selection/utils.js +39 -23
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +24 -0
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +6 -4
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +3 -1
- package/dist/cjs/plugins/type-ahead/index.js +6 -2
- package/dist/cjs/plugins/unsupported-content/index.js +22 -10
- package/dist/cjs/plugins/unsupported-content/styles.js +4 -2
- package/dist/cjs/plugins/unsupported-content/unsupported-inline-node-view.js +21 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +6 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -1
- package/dist/cjs/ui/ContentStyles/index.js +2 -2
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +57 -0
- package/dist/cjs/ui/PortalProvider/index.js +66 -19
- package/dist/cjs/utils/check-if-mobile-bridge.js +19 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +12 -1
- package/dist/es2019/create-editor/ReactEditorView.js +14 -6
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +33 -2
- package/dist/es2019/event-dispatcher/index.js +8 -0
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -10
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +138 -80
- package/dist/es2019/plugins/base/utils/input-latency-tracking.js +128 -0
- package/dist/es2019/plugins/card/styles.js +9 -5
- package/dist/es2019/plugins/code-block/styles.js +11 -8
- package/dist/es2019/plugins/collab-edit/plugin-state.js +23 -8
- package/dist/es2019/plugins/date/styles.js +3 -1
- package/dist/es2019/plugins/emoji/index.js +16 -21
- package/dist/es2019/plugins/emoji/nodeviews/emoji.js +12 -31
- package/dist/es2019/plugins/emoji/styles.js +1 -82
- package/dist/es2019/plugins/expand/ui/styles.js +2 -2
- package/dist/es2019/plugins/extension/ui/styles.js +4 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/es2019/plugins/layout/styles.js +3 -2
- package/dist/es2019/plugins/list/commands/indent-list.js +4 -1
- package/dist/es2019/plugins/list/commands/outdent-list.js +4 -1
- package/dist/es2019/plugins/list/transforms.js +9 -4
- package/dist/es2019/plugins/media/styles.js +9 -7
- package/dist/es2019/plugins/mentions/index.js +1 -6
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -35
- package/dist/es2019/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/es2019/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/es2019/plugins/panel/styles.js +5 -4
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/es2019/plugins/rule/styles.js +2 -1
- package/dist/es2019/plugins/selection/utils.js +35 -20
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +22 -0
- package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
- package/dist/es2019/plugins/table/ui/consts.js +5 -4
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +4 -2
- package/dist/es2019/plugins/type-ahead/index.js +5 -1
- package/dist/es2019/plugins/unsupported-content/index.js +23 -12
- package/dist/es2019/plugins/unsupported-content/styles.js +5 -3
- package/dist/es2019/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +5 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -2
- package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/es2019/ui/ContentStyles/index.js +3 -3
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +39 -0
- package/dist/es2019/ui/PortalProvider/index.js +39 -3
- package/dist/es2019/utils/check-if-mobile-bridge.js +12 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +8 -0
- package/dist/esm/create-editor/ReactEditorView.js +14 -6
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +33 -2
- package/dist/esm/event-dispatcher/index.js +9 -0
- package/dist/esm/nodeviews/ReactNodeView.js +1 -10
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +128 -79
- package/dist/esm/plugins/base/utils/input-latency-tracking.js +149 -0
- package/dist/esm/plugins/card/styles.js +2 -1
- package/dist/esm/plugins/code-block/styles.js +5 -4
- package/dist/esm/plugins/collab-edit/plugin-state.js +21 -6
- package/dist/esm/plugins/date/styles.js +2 -1
- package/dist/esm/plugins/emoji/index.js +26 -29
- package/dist/esm/plugins/emoji/nodeviews/emoji.js +11 -56
- package/dist/esm/plugins/emoji/styles.js +3 -14
- package/dist/esm/plugins/expand/ui/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +20 -22
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +1 -8
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -8
- package/dist/esm/plugins/layout/styles.js +2 -1
- package/dist/esm/plugins/list/commands/indent-list.js +4 -1
- package/dist/esm/plugins/list/commands/outdent-list.js +4 -1
- package/dist/esm/plugins/list/transforms.js +9 -4
- package/dist/esm/plugins/media/styles.js +2 -1
- package/dist/esm/plugins/mentions/index.js +10 -14
- package/dist/esm/plugins/mentions/nodeviews/mention.js +13 -58
- package/dist/esm/plugins/mentions/pm-plugins/main.js +18 -10
- package/dist/esm/plugins/mentions/type-ahead/index.js +7 -2
- package/dist/esm/plugins/panel/styles.js +2 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +3 -1
- package/dist/esm/plugins/rule/styles.js +2 -1
- package/dist/esm/plugins/selection/utils.js +35 -20
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +23 -0
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +5 -4
- package/dist/esm/plugins/tasks-and-decisions/styles.js +2 -1
- package/dist/esm/plugins/type-ahead/index.js +6 -2
- package/dist/esm/plugins/unsupported-content/index.js +21 -11
- package/dist/esm/plugins/unsupported-content/styles.js +3 -2
- package/dist/esm/plugins/unsupported-content/unsupported-inline-node-view.js +7 -0
- package/dist/esm/ui/Appearance/Chromeless.js +6 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -4
- package/dist/esm/ui/ChromeCollapsed/styles.js +2 -1
- package/dist/esm/ui/ContentStyles/index.js +3 -3
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +39 -0
- package/dist/esm/ui/PortalProvider/index.js +61 -19
- package/dist/esm/utils/check-if-mobile-bridge.js +12 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +3 -1
- package/dist/types/editor.d.ts +3 -0
- package/dist/types/event-dispatcher/index.d.ts +1 -0
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -5
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +2 -2
- package/dist/types/plugins/analytics/types/general-events.d.ts +10 -1
- package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +44 -0
- package/dist/types/plugins/collab-edit/plugin-state.d.ts +4 -0
- package/dist/types/plugins/emoji/index.d.ts +2 -6
- package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +4 -14
- package/dist/types/plugins/emoji/styles.d.ts +0 -1
- package/dist/types/plugins/emoji/types.d.ts +0 -1
- package/dist/types/plugins/list/transforms.d.ts +10 -1
- package/dist/types/plugins/mentions/nodeviews/mention.d.ts +6 -14
- package/dist/types/plugins/mentions/pm-plugins/main.d.ts +2 -5
- package/dist/types/plugins/selection/utils.d.ts +7 -15
- package/dist/types/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.d.ts +3 -0
- package/dist/types/plugins/table/ui/consts.d.ts +2 -2
- package/dist/types/plugins/type-ahead/types.d.ts +1 -0
- package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +11 -0
- package/dist/types/types/editor-appearance-component.d.ts +1 -0
- package/dist/types/types/editor-props.d.ts +1 -0
- package/dist/types/types/feature-flags.d.ts +0 -14
- package/dist/types/ui/Appearance/Chromeless.d.ts +1 -0
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +5 -5
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +6 -0
- package/dist/types/ui/PortalProvider/index.d.ts +5 -1
- package/dist/types/utils/check-if-mobile-bridge.d.ts +1 -0
- package/package.json +24 -23
- package/dist/cjs/plugins/emoji/nodeviews/emoji-next.js +0 -250
- package/dist/es2019/plugins/emoji/nodeviews/emoji-next.js +0 -177
- package/dist/esm/plugins/emoji/nodeviews/emoji-next.js +0 -234
- package/dist/types/plugins/emoji/nodeviews/emoji-next.d.ts +0 -31
|
@@ -19,7 +19,7 @@ var safeNumberFeatureFlag = function safeNumberFeatureFlag(value) {
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
export function createFeatureFlagsFromProps(props) {
|
|
22
|
-
var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$
|
|
22
|
+
var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35;
|
|
23
23
|
|
|
24
24
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
25
25
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
@@ -35,29 +35,27 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
35
35
|
singleLayout: _typeof(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
|
|
36
36
|
undoRedoButtons: props.UNSAFE_allowUndoRedoButtons,
|
|
37
37
|
catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables5 = props.allowTables) !== null && _props$allowTables5 !== void 0 && _props$allowTables5.tableOverflowShadowsOptimization),
|
|
38
|
+
stickyHeadersOptimization: typeof ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.stickyHeadersOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
|
|
39
|
+
initialRenderOptimization: typeof ((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.initialRenderOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
|
|
40
|
+
mouseMoveOptimization: typeof ((_props$featureFlags5 = props.featureFlags) === null || _props$featureFlags5 === void 0 ? void 0 : _props$featureFlags5.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags6 = props.featureFlags) !== null && _props$featureFlags6 !== void 0 && _props$featureFlags6.mouseMoveOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
|
|
41
|
+
tableRenderOptimization: typeof ((_props$featureFlags7 = props.featureFlags) === null || _props$featureFlags7 === void 0 ? void 0 : _props$featureFlags7.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.tableRenderOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables4 = props.allowTables) !== null && _props$allowTables4 !== void 0 && _props$allowTables4.tableRenderOptimization),
|
|
42
|
+
tableOverflowShadowsOptimization: typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.tableOverflowShadowsOptimization) : _typeof(props.allowTables) === 'object' && !!((_props$allowTables5 = props.allowTables) !== null && _props$allowTables5 !== void 0 && _props$allowTables5.tableOverflowShadowsOptimization),
|
|
44
43
|
extendFloatingToolbar: Boolean(_typeof(props.allowExtension) === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
ufo: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.ufo) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.ufo) : false),
|
|
44
|
+
useUnpredictableInputRule: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.useUnpredictableInputRule) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.useUnpredictableInputRule) : props.UNSAFE_allowUndoRedoButtons ? false : true),
|
|
45
|
+
showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.showAvatarGroupAsPlugin) : false),
|
|
46
|
+
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.useErrorBoundaryDocStructure) : false),
|
|
47
|
+
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.synchronyErrorDocStructure) : false),
|
|
48
|
+
enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags20 = props.featureFlags) !== null && _props$featureFlags20 !== void 0 && _props$featureFlags20.enableViewUpdateSubscription) : false),
|
|
49
|
+
plainTextPasteLinkification: Boolean(typeof ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.plainTextPasteLinkification) === 'boolean' ? !!((_props$featureFlags22 = props.featureFlags) !== null && _props$featureFlags22 !== void 0 && _props$featureFlags22.plainTextPasteLinkification) : false),
|
|
50
|
+
collabAvatarScroll: Boolean(typeof ((_props$featureFlags23 = props.featureFlags) === null || _props$featureFlags23 === void 0 ? void 0 : _props$featureFlags23.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags24 = props.featureFlags) !== null && _props$featureFlags24 !== void 0 && _props$featureFlags24.collabAvatarScroll) : false),
|
|
51
|
+
ufo: Boolean(typeof ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.ufo) === 'boolean' ? !!((_props$featureFlags26 = props.featureFlags) !== null && _props$featureFlags26 !== void 0 && _props$featureFlags26.ufo) : false),
|
|
54
52
|
codeBlockSyntaxHighlighting: Boolean(typeof normalizedFeatureFlags.codeBlockSyntaxHighlighting === 'boolean' ? !!normalizedFeatureFlags.codeBlockSyntaxHighlighting && !browser.safari : false),
|
|
55
|
-
twoLineEditorToolbar: Boolean(typeof ((_props$
|
|
56
|
-
codeBidiWarnings: Boolean(typeof ((_props$
|
|
57
|
-
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$
|
|
58
|
-
maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$
|
|
53
|
+
twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags27 = props.featureFlags) === null || _props$featureFlags27 === void 0 ? void 0 : _props$featureFlags27.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags28 = props.featureFlags) !== null && _props$featureFlags28 !== void 0 && _props$featureFlags28.twoLineEditorToolbar) : false),
|
|
54
|
+
codeBidiWarnings: Boolean(typeof ((_props$featureFlags29 = props.featureFlags) === null || _props$featureFlags29 === void 0 ? void 0 : _props$featureFlags29.codeBidiWarnings) === 'boolean' ? !!((_props$featureFlags30 = props.featureFlags) !== null && _props$featureFlags30 !== void 0 && _props$featureFlags30.codeBidiWarnings) : true),
|
|
55
|
+
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags31 = props.featureFlags) === null || _props$featureFlags31 === void 0 ? void 0 : _props$featureFlags31.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags32 = props.featureFlags) !== null && _props$featureFlags32 !== void 0 && _props$featureFlags32.saferDispatchedTransactions) : false)),
|
|
56
|
+
maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.maxUnsafeChromeSpellcheckingVersion),
|
|
59
57
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
60
|
-
chromeCursorHandlerFixedVersion: typeof ((_props$
|
|
61
|
-
viewChangingExperimentToolbarStyle: typeof ((_props$
|
|
58
|
+
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
59
|
+
viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined
|
|
62
60
|
});
|
|
63
61
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { createRule, createPlugin } from '../../../utils/input-rules';
|
|
3
3
|
import { LinkMatcher, normalizeUrl } from '../utils';
|
|
4
|
-
import { queueCards } from '../../card/pm-plugins/actions';
|
|
5
4
|
import { INPUT_METHOD, addAnalytics } from '../../analytics';
|
|
6
5
|
import { getLinkCreationAnalyticsEvent } from '../analytics';
|
|
7
6
|
export function createLinkInputRule(regexp) {
|
|
@@ -22,13 +21,7 @@ export function createLinkInputRule(regexp) {
|
|
|
22
21
|
});
|
|
23
22
|
var from = start;
|
|
24
23
|
var to = Math.min(start + link.text.length, state.doc.content.size);
|
|
25
|
-
var tr =
|
|
26
|
-
url: link.url,
|
|
27
|
-
pos: from,
|
|
28
|
-
appearance: 'inline',
|
|
29
|
-
compareLinkText: true,
|
|
30
|
-
source: INPUT_METHOD.AUTO_DETECT
|
|
31
|
-
}])(state.tr.addMark(from, to, markType)); // Keep old behavior that will delete the space after the link
|
|
24
|
+
var tr = state.tr.addMark(from, to, markType); // Keep old behavior that will delete the space after the link
|
|
32
25
|
|
|
33
26
|
if (useUnpredictableInputRule || to === end) {
|
|
34
27
|
tr.insertText(' ');
|
|
@@ -3,7 +3,6 @@ import { getLinkMatch } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import * as keymaps from '../../../keymaps';
|
|
4
4
|
import { stateKey } from '../pm-plugins/main';
|
|
5
5
|
import { showLinkToolbar, hideLinkToolbar } from '../commands';
|
|
6
|
-
import { queueCards } from '../../card/pm-plugins/actions';
|
|
7
6
|
import { INPUT_METHOD, addAnalytics } from '../../analytics';
|
|
8
7
|
import { getLinkCreationAnalyticsEvent } from '../analytics';
|
|
9
8
|
export function createKeymapPlugin() {
|
|
@@ -55,13 +54,7 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
|
|
|
55
54
|
var markType = state.schema.mark('link', {
|
|
56
55
|
href: url
|
|
57
56
|
});
|
|
58
|
-
var tr =
|
|
59
|
-
url: url,
|
|
60
|
-
pos: start,
|
|
61
|
-
appearance: 'inline',
|
|
62
|
-
compareLinkText: true,
|
|
63
|
-
source: INPUT_METHOD.AUTO_DETECT
|
|
64
|
-
}])(state.tr.addMark(start, end, markType));
|
|
57
|
+
var tr = state.tr.addMark(start, end, markType);
|
|
65
58
|
|
|
66
59
|
if (dispatch) {
|
|
67
60
|
if (skipAnalytics) {
|
|
@@ -7,8 +7,9 @@ import { gridSize } from '@atlaskit/theme/constants';
|
|
|
7
7
|
import { N40A, N50A } from '@atlaskit/theme/colors';
|
|
8
8
|
import { columnLayoutSharedStyle } from '@atlaskit/editor-common/styles';
|
|
9
9
|
import { gridMediumMaxWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akLayoutGutterOffset, akEditorSwoopCubicBezier, SelectionStyle, getSelectionStyles, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
10
11
|
import { TableCssClassName } from '../table/types';
|
|
11
12
|
import { tableMarginFullWidthMode } from '../table/ui/consts';
|
|
12
13
|
export var LAYOUT_SECTION_MARGIN = gridSize();
|
|
13
14
|
export var LAYOUT_COLUMN_PADDING = gridSize() * 1.5;
|
|
14
|
-
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-child .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border-color: ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, gridSize() - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, N40A, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, N50A, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
15
|
+
export var layoutStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-child .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border-color: ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), columnLayoutSharedStyle, gridSize() - 1, akLayoutGutterOffset, akEditorSwoopCubicBezier, akEditorSelectedBorderSize, N40A, LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, gridMediumMaxWidth, N50A, token('color.background.danger', akEditorDeleteBackground), token('color.border.danger', akEditorDeleteBorder), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode);
|
|
@@ -12,6 +12,7 @@ import { findFirstParentListNode } from '../utils/find';
|
|
|
12
12
|
import { MAX_NESTED_LIST_INDENTATION } from '../types';
|
|
13
13
|
import { isInsideListItem, isInsideTableCell, getListItemAttributes } from '../utils/selection';
|
|
14
14
|
import { getCommonListAnalyticsAttributes } from '../utils/analytics';
|
|
15
|
+
import { closeHistory } from 'prosemirror-history';
|
|
15
16
|
export function indentList() {
|
|
16
17
|
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INPUT_METHOD.KEYBOARD;
|
|
17
18
|
return function (state, dispatch) {
|
|
@@ -20,8 +21,10 @@ export function indentList() {
|
|
|
20
21
|
|
|
21
22
|
if (!isInsideListItem(state)) {
|
|
22
23
|
return false;
|
|
23
|
-
}
|
|
24
|
+
} // Save the history, so it could undo/revert to the same state before the indent, see https://product-fabric.atlassian.net/browse/ED-14753
|
|
25
|
+
|
|
24
26
|
|
|
27
|
+
closeHistory(tr);
|
|
25
28
|
var firstListItemSelectedAttributes = getListItemAttributes($from);
|
|
26
29
|
var parentListNode = findFirstParentListNode($from);
|
|
27
30
|
|
|
@@ -10,6 +10,7 @@ import { isBulletList } from '../utils/node';
|
|
|
10
10
|
import { findFirstParentListNode } from '../utils/find';
|
|
11
11
|
import { getCommonListAnalyticsAttributes } from '../utils/analytics';
|
|
12
12
|
import { outdentListItemsSelected as outdentListAction } from '../actions/outdent-list-items-selected';
|
|
13
|
+
import { closeHistory } from 'prosemirror-history';
|
|
13
14
|
export function outdentList() {
|
|
14
15
|
var inputMethod = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INPUT_METHOD.KEYBOARD;
|
|
15
16
|
return function (state, dispatch) {
|
|
@@ -23,8 +24,10 @@ export function outdentList() {
|
|
|
23
24
|
if (!parentListNode) {
|
|
24
25
|
// Even though this is a non-operation, we don't want to send this event to the browser. Because if we return false, the browser will move the focus to another place
|
|
25
26
|
return true;
|
|
26
|
-
}
|
|
27
|
+
} // Save the history, so it could undo/revert to the same state before the outdent, see https://product-fabric.atlassian.net/browse/ED-14753
|
|
28
|
+
|
|
27
29
|
|
|
30
|
+
closeHistory(state.tr);
|
|
28
31
|
var actionSubjectId = isBulletList(parentListNode.node) ? ACTION_SUBJECT_ID.FORMAT_LIST_BULLET : ACTION_SUBJECT_ID.FORMAT_LIST_NUMBER;
|
|
29
32
|
var customTr = state.tr;
|
|
30
33
|
outdentListAction(customTr);
|
|
@@ -230,7 +230,7 @@ var extractListFromParagraph = function extractListFromParagraph(node, parent, s
|
|
|
230
230
|
*/
|
|
231
231
|
|
|
232
232
|
|
|
233
|
-
var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
233
|
+
export var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
234
234
|
var fragment = _ref.fragment,
|
|
235
235
|
_ref$blockMarks = _ref.blockMarks,
|
|
236
236
|
blockMarks = _ref$blockMarks === void 0 ? [] : _ref$blockMarks,
|
|
@@ -241,8 +241,14 @@ var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
|
241
241
|
var _schema$nodes3 = schema.nodes,
|
|
242
242
|
hardBreak = _schema$nodes3.hardBreak,
|
|
243
243
|
paragraph = _schema$nodes3.paragraph;
|
|
244
|
-
fragment.forEach(function (node) {
|
|
245
|
-
|
|
244
|
+
fragment.forEach(function (node, i) {
|
|
245
|
+
// ED-14725 Fixed the issue that it make duplicated line
|
|
246
|
+
// when pasting <br /> from google docs.
|
|
247
|
+
if (i === 0 && node.type === hardBreak) {
|
|
248
|
+
paragraphs.push(paragraph.createChecked(undefined, curChildren, _toConsumableArray(blockMarks)));
|
|
249
|
+
lastNode = node;
|
|
250
|
+
return;
|
|
251
|
+
} else if (lastNode && lastNode.type === hardBreak && node.type === hardBreak) {
|
|
246
252
|
// double hardbreak
|
|
247
253
|
// backtrack a little; remove the trailing hardbreak we added last loop
|
|
248
254
|
curChildren.pop(); // create a new paragraph
|
|
@@ -263,7 +269,6 @@ var splitIntoParagraphs = function splitIntoParagraphs(_ref) {
|
|
|
263
269
|
|
|
264
270
|
return Fragment.from(paragraphs.length ? paragraphs : [paragraph.createAndFill(undefined, undefined, _toConsumableArray(blockMarks))]);
|
|
265
271
|
};
|
|
266
|
-
|
|
267
272
|
export var splitParagraphs = function splitParagraphs(slice, schema) {
|
|
268
273
|
// exclude Text nodes with a code mark, since we transform those later
|
|
269
274
|
// into a codeblock
|
|
@@ -7,7 +7,8 @@ import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-com
|
|
|
7
7
|
import { akEditorDeleteBorder, akEditorDeleteBackground, akEditorSelectedBorderBoldSize, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPadding, akEditorSelectedNodeClassName, akEditorDeleteIconColor } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { N60, B200 } from '@atlaskit/theme/colors';
|
|
9
9
|
import { fileCardImageViewSelector, fileCardImageViewSelectedSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
10
|
-
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
11
|
+
export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: 12px;\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: 12px;\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n .mediaGroupView-content-wrap.danger {\n /* Media inline */\n .", "::after {\n border: 1px solid ", ";\n }\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: rgb(255, 189, 173, 0.5); /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n"])), mediaSingleSharedStyle, richMediaClassName, richMediaClassName, richMediaClassName, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, N60, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, B200, token('color.background.danger', akEditorDeleteBackground), akEditorSelectedBorderBoldSize, token('color.border.danger', akEditorDeleteBorder), fileCardImageViewSelectedSelector, token('color.border.danger', akEditorDeleteIconColor), richMediaClassName, fileCardImageViewSelector, token('color.border.danger', akEditorDeleteIconColor), richMediaClassName, inlinePlayerClassName, token('color.border.danger', akEditorDeleteIconColor), richMediaClassName, newFileExperienceClassName, token('color.border.danger', akEditorDeleteIconColor), token('color.icon.danger', akEditorDeleteIconColor));
|
|
11
12
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
12
13
|
* that style applied inside a container that has a scroll, causes any svgs on
|
|
13
14
|
* the page, without a border, that are inside a flexbox, to no longer align to
|
|
@@ -48,26 +48,22 @@ var mentionsPlugin = function mentionsPlugin(options) {
|
|
|
48
48
|
pmPlugins: function pmPlugins() {
|
|
49
49
|
return [{
|
|
50
50
|
name: 'mention',
|
|
51
|
-
plugin: function plugin(
|
|
52
|
-
|
|
53
|
-
dispatch = _ref.dispatch,
|
|
54
|
-
portalProviderAPI = _ref.portalProviderAPI,
|
|
55
|
-
eventDispatcher = _ref.eventDispatcher;
|
|
56
|
-
return createMentionPlugin(dispatch, providerFactory, portalProviderAPI, eventDispatcher, fireEvent, options);
|
|
51
|
+
plugin: function plugin(pmPluginFactoryParams) {
|
|
52
|
+
return createMentionPlugin(pmPluginFactoryParams, fireEvent, options);
|
|
57
53
|
}
|
|
58
54
|
}];
|
|
59
55
|
},
|
|
60
|
-
secondaryToolbarComponent: function secondaryToolbarComponent(
|
|
61
|
-
var editorView =
|
|
62
|
-
disabled =
|
|
56
|
+
secondaryToolbarComponent: function secondaryToolbarComponent(_ref) {
|
|
57
|
+
var editorView = _ref.editorView,
|
|
58
|
+
disabled = _ref.disabled;
|
|
63
59
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
64
60
|
editorView: editorView,
|
|
65
61
|
plugins: {
|
|
66
62
|
mentionState: mentionPluginKey
|
|
67
63
|
},
|
|
68
|
-
render: function render(
|
|
69
|
-
var
|
|
70
|
-
mentionState =
|
|
64
|
+
render: function render(_ref2) {
|
|
65
|
+
var _ref2$mentionState = _ref2.mentionState,
|
|
66
|
+
mentionState = _ref2$mentionState === void 0 ? {} : _ref2$mentionState;
|
|
71
67
|
return !mentionState.mentionProvider ? null : /*#__PURE__*/React.createElement(ToolbarMention, {
|
|
72
68
|
editorView: editorView,
|
|
73
69
|
isDisabled: disabled || isTypeAheadAllowed(editorView.state)
|
|
@@ -76,8 +72,8 @@ var mentionsPlugin = function mentionsPlugin(options) {
|
|
|
76
72
|
});
|
|
77
73
|
},
|
|
78
74
|
pluginsOptions: {
|
|
79
|
-
quickInsert: function quickInsert(
|
|
80
|
-
var formatMessage =
|
|
75
|
+
quickInsert: function quickInsert(_ref3) {
|
|
76
|
+
var formatMessage = _ref3.formatMessage;
|
|
81
77
|
return [{
|
|
82
78
|
id: 'mention',
|
|
83
79
|
title: formatMessage(messages.mention),
|
|
@@ -1,60 +1,15 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _get from "@babel/runtime/helpers/get";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
|
|
10
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
-
|
|
12
1
|
import React from 'react';
|
|
13
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
14
2
|
import Mention from '../ui/Mention';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
key: "createDomRef",
|
|
29
|
-
value: function createDomRef() {
|
|
30
|
-
return _get(_getPrototypeOf(MentionNodeView.prototype), "createDomRef", this).call(this);
|
|
31
|
-
}
|
|
32
|
-
}, {
|
|
33
|
-
key: "render",
|
|
34
|
-
value: function render(props) {
|
|
35
|
-
var providerFactory = props.providerFactory,
|
|
36
|
-
options = props.options;
|
|
37
|
-
var _this$node$attrs = this.node.attrs,
|
|
38
|
-
id = _this$node$attrs.id,
|
|
39
|
-
text = _this$node$attrs.text,
|
|
40
|
-
accessLevel = _this$node$attrs.accessLevel;
|
|
41
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mention, {
|
|
42
|
-
id: id,
|
|
43
|
-
text: text,
|
|
44
|
-
accessLevel: accessLevel,
|
|
45
|
-
providers: providerFactory
|
|
46
|
-
}), options && options.allowZeroWidthSpaceAfter && ZERO_WIDTH_SPACE);
|
|
47
|
-
}
|
|
48
|
-
}]);
|
|
49
|
-
|
|
50
|
-
return MentionNodeView;
|
|
51
|
-
}(ReactNodeView);
|
|
52
|
-
export default function mentionNodeView(portalProviderAPI, eventDispatcher, providerFactory, options) {
|
|
53
|
-
return function (node, view, getPos) {
|
|
54
|
-
var hasIntlContext = true;
|
|
55
|
-
return new MentionNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
56
|
-
providerFactory: providerFactory,
|
|
57
|
-
options: options
|
|
58
|
-
}, undefined, undefined, undefined, hasIntlContext).init();
|
|
59
|
-
};
|
|
60
|
-
}
|
|
3
|
+
export var MentionNodeView = function MentionNodeView(props) {
|
|
4
|
+
var providerFactory = props.providerFactory;
|
|
5
|
+
var _props$node$attrs = props.node.attrs,
|
|
6
|
+
id = _props$node$attrs.id,
|
|
7
|
+
text = _props$node$attrs.text,
|
|
8
|
+
accessLevel = _props$node$attrs.accessLevel;
|
|
9
|
+
return /*#__PURE__*/React.createElement(Mention, {
|
|
10
|
+
id: id,
|
|
11
|
+
text: text,
|
|
12
|
+
accessLevel: accessLevel,
|
|
13
|
+
providers: providerFactory
|
|
14
|
+
});
|
|
15
|
+
};
|
|
@@ -6,7 +6,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6
6
|
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
8
|
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE, buildSliPayload } from '@atlaskit/mention/resource';
|
|
9
|
-
import
|
|
9
|
+
import { getInlineNodeViewProducer } from '../../../nodeviews/getInlineNodeViewProducer';
|
|
10
|
+
import { MentionNodeView } from '../nodeviews/mention';
|
|
10
11
|
import { mentionPluginKey } from './key';
|
|
11
12
|
var ACTIONS = {
|
|
12
13
|
SET_PROVIDER: 'SET_PROVIDER',
|
|
@@ -42,7 +43,7 @@ export var setContext = function setContext(context) {
|
|
|
42
43
|
return true;
|
|
43
44
|
};
|
|
44
45
|
};
|
|
45
|
-
export function createMentionPlugin(
|
|
46
|
+
export function createMentionPlugin(pmPluginFactoryParams, fireEvent, options) {
|
|
46
47
|
var mentionProvider;
|
|
47
48
|
|
|
48
49
|
var sendAnalytics = function sendAnalytics(event, actionSubject, action, attributes) {
|
|
@@ -72,14 +73,14 @@ export function createMentionPlugin(dispatch, providerFactory, portalProviderAPI
|
|
|
72
73
|
newPluginState = _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
73
74
|
mentionProvider: params.provider
|
|
74
75
|
});
|
|
75
|
-
dispatch(mentionPluginKey, newPluginState);
|
|
76
|
+
pmPluginFactoryParams.dispatch(mentionPluginKey, newPluginState);
|
|
76
77
|
return newPluginState;
|
|
77
78
|
|
|
78
79
|
case ACTIONS.SET_CONTEXT:
|
|
79
80
|
newPluginState = _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
80
81
|
contextIdentifierProvider: params.context
|
|
81
82
|
});
|
|
82
|
-
dispatch(mentionPluginKey, newPluginState);
|
|
83
|
+
pmPluginFactoryParams.dispatch(mentionPluginKey, newPluginState);
|
|
83
84
|
return newPluginState;
|
|
84
85
|
}
|
|
85
86
|
|
|
@@ -88,7 +89,14 @@ export function createMentionPlugin(dispatch, providerFactory, portalProviderAPI
|
|
|
88
89
|
},
|
|
89
90
|
props: {
|
|
90
91
|
nodeViews: {
|
|
91
|
-
mention:
|
|
92
|
+
mention: getInlineNodeViewProducer({
|
|
93
|
+
pmPluginFactoryParams: pmPluginFactoryParams,
|
|
94
|
+
Component: MentionNodeView,
|
|
95
|
+
extraComponentProps: {
|
|
96
|
+
providerFactory: pmPluginFactoryParams.providerFactory,
|
|
97
|
+
options: options
|
|
98
|
+
}
|
|
99
|
+
})
|
|
92
100
|
}
|
|
93
101
|
},
|
|
94
102
|
view: function view(editorView) {
|
|
@@ -126,13 +134,13 @@ export function createMentionPlugin(dispatch, providerFactory, portalProviderAPI
|
|
|
126
134
|
return;
|
|
127
135
|
};
|
|
128
136
|
|
|
129
|
-
providerFactory.subscribe('mentionProvider', providerHandler);
|
|
130
|
-
providerFactory.subscribe('contextIdentifierProvider', providerHandler);
|
|
137
|
+
pmPluginFactoryParams.providerFactory.subscribe('mentionProvider', providerHandler);
|
|
138
|
+
pmPluginFactoryParams.providerFactory.subscribe('contextIdentifierProvider', providerHandler);
|
|
131
139
|
return {
|
|
132
140
|
destroy: function destroy() {
|
|
133
|
-
if (providerFactory) {
|
|
134
|
-
providerFactory.unsubscribe('mentionProvider', providerHandler);
|
|
135
|
-
providerFactory.unsubscribe('contextIdentifierProvider', providerHandler);
|
|
141
|
+
if (pmPluginFactoryParams.providerFactory) {
|
|
142
|
+
pmPluginFactoryParams.providerFactory.unsubscribe('mentionProvider', providerHandler);
|
|
143
|
+
pmPluginFactoryParams.providerFactory.unsubscribe('contextIdentifierProvider', providerHandler);
|
|
136
144
|
}
|
|
137
145
|
|
|
138
146
|
if (mentionProvider) {
|
|
@@ -378,10 +378,15 @@ export var createTypeAheadConfig = function createTypeAheadConfig(_ref6) {
|
|
|
378
378
|
dismiss: function dismiss(_ref9) {
|
|
379
379
|
var editorState = _ref9.editorState,
|
|
380
380
|
query = _ref9.query,
|
|
381
|
-
stats = _ref9.stats
|
|
381
|
+
stats = _ref9.stats,
|
|
382
|
+
wasItemInserted = _ref9.wasItemInserted;
|
|
382
383
|
firstQueryWithoutResults = null;
|
|
383
384
|
var pickerElapsedTime = stats.startedAt ? Date.now() - stats.startedAt : 0;
|
|
384
|
-
|
|
385
|
+
|
|
386
|
+
if (!wasItemInserted) {
|
|
387
|
+
fireEvent(buildTypeAheadCancelPayload(pickerElapsedTime, stats.keyCount.arrowUp, stats.keyCount.arrowDown, sessionId, query || ''));
|
|
388
|
+
}
|
|
389
|
+
|
|
385
390
|
var pluginState = getMentionPluginState(editorState);
|
|
386
391
|
|
|
387
392
|
if (pluginState !== null && pluginState !== void 0 && pluginState.mentionProvider) {
|
|
@@ -5,6 +5,7 @@ var _templateObject;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { panelSharedStyles, PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
7
7
|
import { SelectionStyle, getSelectionStyles, akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
export var panelStyles = function panelStyles(props) {
|
|
9
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n cursor: pointer;\n\n /* Danger when top level node */\n &.danger {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", " !important;\n\n .", " {\n color: ", " !important;\n }\n }\n }\n\n .", " {\n cursor: text;\n }\n\n /* Danger when nested node */\n .danger .", " {\n &[data-panel-type] {\n background-color: ", ";\n\n .", " {\n color: ", ";\n }\n }\n }\n\n ", ";\n }\n\n .", ".", ":not(.danger) {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackground, PanelSharedCssClassName.icon, akEditorDeleteIconColor, PanelSharedCssClassName.content, PanelSharedCssClassName.prefix, akEditorDeleteBackgroundWithOpacity, PanelSharedCssClassName.icon, akEditorDeleteIconColor, panelSharedStyles(props), PanelSharedCssClassName.prefix, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]));
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n cursor: pointer;\n\n /* Danger when top level node */\n &.danger {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", " !important;\n\n .", " {\n color: ", " !important;\n }\n }\n }\n\n .", " {\n cursor: text;\n }\n\n /* Danger when nested node */\n .danger .", " {\n &[data-panel-type] {\n background-color: ", ";\n\n .", " {\n color: ", ";\n }\n }\n }\n\n ", ";\n }\n\n .", ".", ":not(.danger) {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, akEditorSelectedBorderSize, akEditorDeleteBorder, token('color.background.danger', akEditorDeleteBackground), PanelSharedCssClassName.icon, token('color.icon.danger', akEditorDeleteIconColor), PanelSharedCssClassName.content, PanelSharedCssClassName.prefix, token('color.blanket.danger', akEditorDeleteBackgroundWithOpacity), PanelSharedCssClassName.icon, token('color.icon.danger', akEditorDeleteIconColor), panelSharedStyles(props), PanelSharedCssClassName.prefix, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]));
|
|
10
11
|
};
|
|
@@ -5,7 +5,9 @@ import { browser, ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
|
5
5
|
|
|
6
6
|
var serializePlaceholderNode = function serializePlaceholderNode(node) {
|
|
7
7
|
var element = document.createElement('span');
|
|
8
|
-
element.classList.add('pm-placeholder');
|
|
8
|
+
element.classList.add('pm-placeholder'); // the inline node api test suite requires the following class name
|
|
9
|
+
|
|
10
|
+
element.classList.add('placeholderView-content-wrap');
|
|
9
11
|
|
|
10
12
|
if (browser.gecko) {
|
|
11
13
|
element.setAttribute('contenteditable', 'true');
|
|
@@ -5,6 +5,7 @@ var _templateObject;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { ruleSharedStyles } from '@atlaskit/editor-common/styles';
|
|
7
7
|
import { akEditorLineHeight, akEditorSelectedBorderColor, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
export var ruleStyles = function ruleStyles(props) {
|
|
9
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: 4px 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), ruleSharedStyles(props), akEditorLineHeight, akEditorSelectedNodeClassName, akEditorSelectedBorderColor);
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n\n hr {\n cursor: pointer;\n padding: 4px 0;\n margin: calc(", "em - 4px) 0;\n background-clip: content-box;\n\n &.", " {\n outline: none;\n background-color: ", ";\n }\n }\n }\n"])), ruleSharedStyles(props), akEditorLineHeight, akEditorSelectedNodeClassName, token('color.border.selected', akEditorSelectedBorderColor));
|
|
10
11
|
};
|
|
@@ -39,7 +39,7 @@ export var getDecorations = function getDecorations(tr) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
if (tr.selection instanceof TextSelection || tr.selection instanceof AllSelection) {
|
|
42
|
-
var decorations =
|
|
42
|
+
var decorations = getNodesToDecorateFromSelection(tr.selection, tr.doc).map(function (_ref) {
|
|
43
43
|
var node = _ref.node,
|
|
44
44
|
pos = _ref.pos;
|
|
45
45
|
return Decoration.node(pos, pos + node.nodeSize, {
|
|
@@ -91,38 +91,53 @@ export function getCellSelectionAnalyticsPayload(state) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
+
var topLevelBlockNodesThatHaveSelectionStyles = ['table', 'panel', 'expand', 'layoutSection', 'decisionList', 'decisionItem', 'codeBlock'];
|
|
94
95
|
/**
|
|
95
|
-
* Use `
|
|
96
|
-
* a list of
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* For example, using the following document:
|
|
102
|
-
* ```
|
|
103
|
-
* doc(p('{<}one'), blockquote(p('hello')), p(expand({ title: 'two' })(p('three'))), p('four{>}'))))
|
|
104
|
-
* ```
|
|
105
|
-
* we would expect `getTopLevelNodesFromSelection` to return:
|
|
106
|
-
* ```
|
|
107
|
-
* [blockquote(p('hello')), expand({ title: 'two' })(p('three')))]
|
|
108
|
-
* ```
|
|
96
|
+
* Use `getNodesToDecorateFromSelection` to collect and return
|
|
97
|
+
* a list of nodes within the Selection that should have Selection
|
|
98
|
+
* decorations applied. This allows selection styles to be added to
|
|
99
|
+
* nested nodes. It will ignore text nodes as decorations are
|
|
100
|
+
* applied natively and also ignore nodes that don't completely
|
|
101
|
+
* sit within the given `Selection`.
|
|
109
102
|
*/
|
|
110
103
|
|
|
111
|
-
export var
|
|
104
|
+
export var getNodesToDecorateFromSelection = function getNodesToDecorateFromSelection(selection, doc) {
|
|
112
105
|
var nodes = [];
|
|
113
106
|
|
|
114
107
|
if (selection.from !== selection.to) {
|
|
115
108
|
var from = selection.from,
|
|
116
109
|
to = selection.to;
|
|
117
110
|
doc.nodesBetween(from, to, function (node, pos) {
|
|
118
|
-
var withinSelection = from <= pos && pos + node.nodeSize <= to;
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
var withinSelection = from <= pos && pos + node.nodeSize <= to; // The reason we need to check for these nodes is to stop
|
|
112
|
+
// traversing their children if they are within a selection -
|
|
113
|
+
// this is to prevent selection styles from being added to
|
|
114
|
+
// the children as well as the parent node.
|
|
115
|
+
// Example scenario is if an entire table has been selected
|
|
116
|
+
// we should not traverse its children so we can apply the
|
|
117
|
+
// selection styles to the table. But if an entire tableRow
|
|
118
|
+
// has been selected (but the parent table has not) we should
|
|
119
|
+
// traverse it as it could contain other nodes that need
|
|
120
|
+
// selection styles. I couldn’t see a clear way to differentiate
|
|
121
|
+
// without explicitly stating which nodes should be traversed
|
|
122
|
+
// and which shouldn’t.
|
|
123
|
+
|
|
124
|
+
var isTopLevelNodeThatHasSelectionStyles = topLevelBlockNodesThatHaveSelectionStyles.includes(node.type.name); // If the node is a top-level block node and completely sits within
|
|
125
|
+
// the selection, we do not recurse it's children to prevent selection
|
|
126
|
+
// styles being added to its child nodes. The expected behaviour
|
|
127
|
+
// is that selection styles are only added to the parent.
|
|
128
|
+
|
|
129
|
+
if (node && withinSelection && isTopLevelNodeThatHasSelectionStyles) {
|
|
130
|
+
nodes.push({
|
|
131
|
+
node: node,
|
|
132
|
+
pos: pos
|
|
133
|
+
});
|
|
134
|
+
return false; // Otherwise we recurse the children and return them so we can apply
|
|
135
|
+
// selection styles. Text is handled by the browser.
|
|
136
|
+
} else if (node && withinSelection && !node.isText) {
|
|
121
137
|
nodes.push({
|
|
122
138
|
node: node,
|
|
123
139
|
pos: pos
|
|
124
140
|
});
|
|
125
|
-
return false;
|
|
126
141
|
}
|
|
127
142
|
|
|
128
143
|
return true;
|