@atlaskit/editor-core 180.1.0 → 181.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/cjs/actions/index.js +25 -10
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +0 -5
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +73 -103
- package/dist/cjs/create-editor/create-plugins-list.js +37 -5
- package/dist/cjs/create-editor/feature-flags-from-props.js +31 -26
- package/dist/cjs/create-editor/preset-utils.js +27 -0
- package/dist/cjs/editor-next/editor-internal.js +2 -2
- package/dist/cjs/editor-next/editor-migration-component.js +18 -2
- package/dist/cjs/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/cjs/editor-next/index.js +13 -9
- package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
- package/dist/cjs/editor-next/utils/handleProviders.js +17 -22
- package/dist/cjs/editor.js +20 -13
- package/dist/cjs/keymaps/consts.js +1 -16
- package/dist/cjs/labs/next/presets/cxhtml.js +56 -55
- package/dist/cjs/labs/next/presets/default.js +15 -42
- package/dist/cjs/labs/next/presets/mobile.js +76 -89
- package/dist/cjs/labs/next/presets/universal.js +330 -257
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
- package/dist/cjs/plugins/analytics/plugin.js +6 -0
- package/dist/cjs/plugins/annotation/utils.js +2 -36
- package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
- package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
- package/dist/cjs/plugins/caption/index.js +0 -7
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +6 -3
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
- package/dist/cjs/plugins/collab-edit/provider/index.js +1 -8
- package/dist/cjs/plugins/collab-edit/provider/types.js +1 -12
- package/dist/cjs/plugins/context-panel/index.js +1 -6
- package/dist/cjs/plugins/data-consumer/index.js +0 -8
- package/dist/cjs/plugins/date/utils/internal.js +0 -4
- package/dist/cjs/plugins/extension/commands.js +1 -8
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/cjs/plugins/feedback-dialog/index.js +1 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
- package/dist/cjs/plugins/fragment/index.js +0 -8
- package/dist/cjs/plugins/help-dialog/commands.js +2 -6
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
- package/dist/cjs/plugins/layout/styles.js +10 -1
- package/dist/cjs/plugins/list/utils/find.js +0 -28
- package/dist/cjs/plugins/list/utils/indentation.js +1 -25
- package/dist/cjs/plugins/list/utils/node.js +0 -5
- package/dist/cjs/plugins/list/utils/selection.js +2 -15
- package/dist/cjs/plugins/media/utils/media-common.js +1 -20
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +100 -16
- package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
- package/dist/cjs/plugins/mobile-dimensions/index.js +1 -4
- package/dist/cjs/plugins/paste/index.js +1 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +123 -87
- package/dist/cjs/plugins/paste/util/index.js +0 -46
- package/dist/cjs/plugins/quick-insert/assets/index.js +1 -27
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +49 -44
- package/dist/cjs/plugins/status/utils.js +1 -15
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/cjs/plugins/text-formatting/utils.js +1 -26
- package/dist/cjs/plugins/type-ahead/constants.js +1 -7
- package/dist/cjs/plugins/type-ahead/index.js +4 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +6 -37
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/cjs/plugins/type-ahead/utils.js +25 -24
- package/dist/cjs/test-utils.js +4 -12
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
- package/dist/cjs/ui/ColorPalette/index.js +18 -0
- package/dist/cjs/ui/ColorPickerButton/index.js +6 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/cjs/ui/ConfigPanel/utils.js +4 -17
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
- package/dist/cjs/ui/Resizer/utils.js +1 -3
- package/dist/cjs/ui/styles.js +3 -7
- package/dist/cjs/utils/get-editor-plugins.js +1 -3
- package/dist/cjs/utils/index.js +9 -269
- package/dist/cjs/utils/input-rules.js +1 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +23 -9
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +0 -5
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +67 -82
- package/dist/es2019/create-editor/create-plugins-list.js +32 -5
- package/dist/es2019/create-editor/feature-flags-from-props.js +31 -26
- package/dist/es2019/create-editor/preset-utils.js +15 -0
- package/dist/es2019/editor-next/editor-internal.js +2 -2
- package/dist/es2019/editor-next/editor-migration-component.js +19 -2
- package/dist/es2019/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/es2019/editor-next/index.js +13 -7
- package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
- package/dist/es2019/editor-next/utils/handleProviders.js +18 -24
- package/dist/es2019/editor.js +20 -11
- package/dist/es2019/keymaps/consts.js +7 -11
- package/dist/es2019/labs/next/presets/cxhtml.js +56 -53
- package/dist/es2019/labs/next/presets/default.js +18 -38
- package/dist/es2019/labs/next/presets/mobile.js +88 -88
- package/dist/es2019/labs/next/presets/universal.js +338 -265
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
- package/dist/es2019/plugins/analytics/plugin.js +7 -0
- package/dist/es2019/plugins/annotation/utils.js +2 -30
- package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
- package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/es2019/plugins/caption/index.js +0 -2
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -4
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/es2019/plugins/card/pm-plugins/main.js +6 -3
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
- package/dist/es2019/plugins/collab-edit/provider/index.js +1 -1
- package/dist/es2019/plugins/collab-edit/provider/types.js +1 -10
- package/dist/es2019/plugins/context-panel/index.js +0 -3
- package/dist/es2019/plugins/data-consumer/index.js +0 -7
- package/dist/es2019/plugins/date/utils/internal.js +0 -3
- package/dist/es2019/plugins/extension/commands.js +0 -6
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +12 -2
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +3 -0
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/es2019/plugins/feedback-dialog/index.js +0 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +21 -4
- package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
- package/dist/es2019/plugins/fragment/index.js +0 -7
- package/dist/es2019/plugins/help-dialog/commands.js +1 -2
- package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
- package/dist/es2019/plugins/layout/styles.js +12 -4
- package/dist/es2019/plugins/list/utils/find.js +0 -27
- package/dist/es2019/plugins/list/utils/indentation.js +0 -23
- package/dist/es2019/plugins/list/utils/node.js +1 -4
- package/dist/es2019/plugins/list/utils/selection.js +2 -15
- package/dist/es2019/plugins/media/utils/media-common.js +1 -19
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +64 -16
- package/dist/es2019/plugins/mentions/type-ahead/index.js +1 -14
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/es2019/plugins/mobile-dimensions/index.js +0 -3
- package/dist/es2019/plugins/paste/index.js +1 -2
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +126 -94
- package/dist/es2019/plugins/paste/util/index.js +5 -45
- package/dist/es2019/plugins/quick-insert/assets/index.js +0 -8
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +56 -56
- package/dist/es2019/plugins/status/utils.js +1 -11
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/es2019/plugins/text-formatting/utils.js +0 -19
- package/dist/es2019/plugins/type-ahead/constants.js +0 -5
- package/dist/es2019/plugins/type-ahead/index.js +4 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +4 -37
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/es2019/plugins/type-ahead/utils.js +22 -25
- package/dist/es2019/test-utils.js +4 -7
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
- package/dist/es2019/ui/ColorPalette/index.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +6 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/es2019/ui/ConfigPanel/utils.js +0 -6
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/es2019/ui/styles.js +0 -6
- package/dist/es2019/utils/get-editor-plugins.js +1 -3
- package/dist/es2019/utils/index.js +13 -199
- package/dist/es2019/utils/input-rules.js +0 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +23 -9
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +0 -5
- package/dist/esm/create-editor/ReactEditorViewInternal.js +73 -102
- package/dist/esm/create-editor/create-plugins-list.js +36 -5
- package/dist/esm/create-editor/feature-flags-from-props.js +31 -26
- package/dist/esm/create-editor/preset-utils.js +21 -0
- package/dist/esm/editor-next/editor-internal.js +2 -2
- package/dist/esm/editor-next/editor-migration-component.js +18 -2
- package/dist/esm/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/esm/editor-next/index.js +13 -9
- package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
- package/dist/esm/editor-next/utils/handleProviders.js +17 -22
- package/dist/esm/editor.js +20 -13
- package/dist/esm/keymaps/consts.js +7 -11
- package/dist/esm/labs/next/presets/cxhtml.js +56 -55
- package/dist/esm/labs/next/presets/default.js +18 -41
- package/dist/esm/labs/next/presets/mobile.js +88 -90
- package/dist/esm/labs/next/presets/universal.js +330 -257
- package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
- package/dist/esm/plugins/analytics/plugin.js +6 -0
- package/dist/esm/plugins/annotation/utils.js +2 -32
- package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
- package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/esm/plugins/caption/index.js +0 -2
- package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/esm/plugins/card/pm-plugins/main.js +6 -3
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/index.js +1 -1
- package/dist/esm/plugins/collab-edit/provider/types.js +1 -10
- package/dist/esm/plugins/context-panel/index.js +0 -3
- package/dist/esm/plugins/data-consumer/index.js +0 -7
- package/dist/esm/plugins/date/utils/internal.js +0 -3
- package/dist/esm/plugins/extension/commands.js +0 -6
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/esm/plugins/feedback-dialog/index.js +0 -2
- package/dist/esm/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
- package/dist/esm/plugins/fragment/index.js +0 -7
- package/dist/esm/plugins/help-dialog/commands.js +0 -3
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
- package/dist/esm/plugins/layout/styles.js +11 -2
- package/dist/esm/plugins/list/utils/find.js +0 -27
- package/dist/esm/plugins/list/utils/indentation.js +0 -23
- package/dist/esm/plugins/list/utils/node.js +1 -4
- package/dist/esm/plugins/list/utils/selection.js +2 -12
- package/dist/esm/plugins/media/utils/media-common.js +1 -17
- package/dist/esm/plugins/mentions/nodeviews/mention.js +97 -16
- package/dist/esm/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/esm/plugins/mobile-dimensions/index.js +0 -3
- package/dist/esm/plugins/paste/index.js +1 -2
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +122 -86
- package/dist/esm/plugins/paste/util/index.js +5 -45
- package/dist/esm/plugins/quick-insert/assets/index.js +0 -20
- package/dist/esm/plugins/selection/gap-cursor/actions.js +52 -45
- package/dist/esm/plugins/status/utils.js +1 -13
- package/dist/esm/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/esm/plugins/text-formatting/utils.js +0 -21
- package/dist/esm/plugins/type-ahead/constants.js +0 -5
- package/dist/esm/plugins/type-ahead/index.js +4 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +4 -33
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/esm/plugins/type-ahead/utils.js +24 -22
- package/dist/esm/test-utils.js +4 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
- package/dist/esm/ui/ColorPalette/index.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +6 -2
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/esm/ui/ConfigPanel/utils.js +3 -14
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/esm/ui/styles.js +2 -5
- package/dist/esm/utils/get-editor-plugins.js +1 -3
- package/dist/esm/utils/index.js +13 -196
- package/dist/esm/utils/input-rules.js +0 -13
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +4 -4
- package/dist/types/create-editor/ReactEditorView.d.ts +0 -3
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +9 -7
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +3 -4
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -5
- package/dist/types/create-editor/preset-utils.d.ts +2 -0
- package/dist/types/editor-next/editor-internal.d.ts +9 -9
- package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +2 -2
- package/dist/types/editor-next/hooks/useProviderFactory.d.ts +2 -2
- package/dist/types/editor-next/index.d.ts +6 -6
- package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -2
- package/dist/types/editor-next/utils/editorPropTypes.d.ts +1 -1
- package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
- package/dist/types/editor-next/utils/handleProviders.d.ts +2 -2
- package/dist/types/editor-next/utils/onEditorCreated.d.ts +2 -2
- package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +1 -1
- package/dist/types/editor.d.ts +7 -4
- package/dist/types/keymaps/consts.d.ts +0 -11
- package/dist/types/labs/next/presets/cxhtml.d.ts +33 -1
- package/dist/types/labs/next/presets/default.d.ts +67 -10
- package/dist/types/labs/next/presets/mobile.d.ts +33 -1
- package/dist/types/labs/next/presets/universal.d.ts +5 -13
- package/dist/types/labs/next/presets/useUniversalPreset.d.ts +7 -0
- package/dist/types/nodeviews/context-adapter.d.ts +0 -1
- package/dist/types/nodeviews/index.d.ts +0 -1
- package/dist/types/plugins/alignment/pm-plugins/types.d.ts +0 -11
- package/dist/types/plugins/annotation/utils.d.ts +0 -17
- package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
- package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
- package/dist/types/plugins/caption/index.d.ts +0 -2
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +1 -0
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +0 -4
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
- package/dist/types/plugins/collab-edit/provider/index.d.ts +1 -2
- package/dist/types/plugins/collab-edit/provider/types.d.ts +1 -36
- package/dist/types/plugins/context-panel/index.d.ts +2 -3
- package/dist/types/plugins/data-consumer/index.d.ts +0 -2
- package/dist/types/plugins/date/utils/internal.d.ts +0 -1
- package/dist/types/plugins/extension/commands.d.ts +0 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
- package/dist/types/plugins/feedback-dialog/index.d.ts +0 -2
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
- package/dist/types/plugins/fragment/index.d.ts +0 -2
- package/dist/types/plugins/help-dialog/commands.d.ts +0 -1
- package/dist/types/plugins/history/actions.d.ts +1 -2
- package/dist/types/plugins/layout/styles.d.ts +2 -1
- package/dist/types/plugins/list/utils/find.d.ts +0 -1
- package/dist/types/plugins/list/utils/indentation.d.ts +0 -1
- package/dist/types/plugins/list/utils/node.d.ts +0 -2
- package/dist/types/plugins/list/utils/selection.d.ts +0 -3
- package/dist/types/plugins/media/utils/media-common.d.ts +0 -5
- package/dist/types/plugins/mentions/types.d.ts +1 -2
- package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +2 -3
- package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -6
- package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -4
- package/dist/types/plugins/mobile-dimensions/index.d.ts +0 -1
- package/dist/types/plugins/paste/index.d.ts +0 -1
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +6 -3
- package/dist/types/plugins/paste/util/index.d.ts +0 -6
- package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
- package/dist/types/plugins/status/utils.d.ts +0 -3
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -4
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
- package/dist/types/plugins/type-ahead/index.d.ts +1 -0
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +2 -11
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +3 -3
- package/dist/types/test-utils.d.ts +4 -5
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +55 -42
- package/dist/types/ui/Appearance/Chromeless.d.ts +0 -5
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +0 -7
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +3 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
- package/dist/types/ui/ColorPalette/Palettes/index.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types/ui/ColorPalette/index.d.ts +2 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +4 -2
- package/dist/types/ui/ConfigPanel/types.d.ts +0 -3
- package/dist/types/ui/ConfigPanel/utils.d.ts +2 -3
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +0 -3
- package/dist/types/ui/ElementBrowser/constants.d.ts +0 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +0 -5
- package/dist/types/ui/Resizer/utils.d.ts +0 -1
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/index.d.ts +6 -65
- package/dist/types/utils/input-rules.d.ts +1 -2
- package/dist/types/utils/table.d.ts +0 -1
- package/package.json +23 -24
- package/report.api.md +155 -146
- package/dist/cjs/labs/next/presets/preset.js +0 -101
- package/dist/cjs/plugins/analytics/types/type-ahead.js +0 -5
- package/dist/cjs/plugins/collab-edit/provider/channel.js +0 -313
- package/dist/cjs/plugins/collab-edit/provider/logger.js +0 -17
- package/dist/cjs/plugins/collab-edit/provider/mock-users.js +0 -19
- package/dist/cjs/plugins/data-consumer/plugin-key.js +0 -9
- package/dist/cjs/plugins/media/toolbar/toolbar-messages.js +0 -15
- package/dist/cjs/profiler/render-count.js +0 -60
- package/dist/cjs/ui/ColorPalette/Color/index.js +0 -9
- package/dist/cjs/ui/ConfigPanel/FieldDescription.js +0 -19
- package/dist/cjs/ui/WithPluginState/types.js +0 -5
- package/dist/es2019/labs/next/presets/preset.js +0 -68
- package/dist/es2019/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/es2019/plugins/collab-edit/provider/channel.js +0 -179
- package/dist/es2019/plugins/collab-edit/provider/logger.js +0 -8
- package/dist/es2019/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/es2019/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/es2019/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/es2019/profiler/render-count.js +0 -53
- package/dist/es2019/ui/ColorPalette/Color/index.js +0 -2
- package/dist/es2019/ui/ConfigPanel/FieldDescription.js +0 -12
- package/dist/es2019/ui/WithPluginState/types.js +0 -1
- package/dist/esm/labs/next/presets/preset.js +0 -93
- package/dist/esm/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/esm/plugins/collab-edit/provider/channel.js +0 -305
- package/dist/esm/plugins/collab-edit/provider/logger.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/esm/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/esm/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/esm/profiler/render-count.js +0 -49
- package/dist/esm/ui/ColorPalette/Color/index.js +0 -2
- package/dist/esm/ui/ConfigPanel/FieldDescription.js +0 -11
- package/dist/esm/ui/WithPluginState/types.js +0 -1
- package/dist/types/labs/next/presets/preset.d.ts +0 -46
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/channel.d.ts +0 -48
- package/dist/types/plugins/collab-edit/provider/logger.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/mock-users.d.ts +0 -6
- package/dist/types/plugins/data-consumer/plugin-key.d.ts +0 -2
- package/dist/types/plugins/media/toolbar/toolbar-messages.d.ts +0 -7
- package/dist/types/profiler/render-count.d.ts +0 -14
- package/dist/types/ui/ColorPalette/Color/index.d.ts +0 -2
- package/dist/types/ui/ConfigPanel/FieldDescription.d.ts +0 -6
- package/dist/types/ui/WithPluginState/types.d.ts +0 -10
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ACTION, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, PasteTypes, PasteContents, withAnalytics } from '../../analytics';
|
|
2
2
|
import { getPasteSource } from '../util';
|
|
3
3
|
import { handlePasteAsPlainText, handlePasteIntoTaskOrDecisionOrPanel, handleCodeBlock, handleMediaSingle, handlePastePreservingMarks, handleMarkdown, handleRichText, handleExpandPasteInTable, handleSelectedTable, handlePasteLinkOnSelectedText, handlePasteIntoCaption, handlePastePanelOrDecisionContentIntoList, handlePasteNonNestableBlockNodesIntoList } from '../handlers';
|
|
4
|
-
import { pipe } from '../../../utils';
|
|
5
4
|
import { findParentNode } from 'prosemirror-utils';
|
|
6
5
|
import { mapSlice } from '../../../utils/slice';
|
|
7
6
|
import { getLinkDomain } from '../../hyperlink/utils';
|
|
@@ -50,17 +49,18 @@ const nodeToActionSubjectId = {
|
|
|
50
49
|
tableRow: ACTION_SUBJECT_ID.PASTE_TABLE_ROW,
|
|
51
50
|
taskList: ACTION_SUBJECT_ID.PASTE_TASK_LIST
|
|
52
51
|
};
|
|
53
|
-
export function getContent(
|
|
52
|
+
export function getContent({
|
|
53
|
+
schema,
|
|
54
|
+
slice
|
|
55
|
+
}) {
|
|
54
56
|
const {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
link
|
|
61
|
-
}
|
|
57
|
+
nodes: {
|
|
58
|
+
paragraph
|
|
59
|
+
},
|
|
60
|
+
marks: {
|
|
61
|
+
link
|
|
62
62
|
}
|
|
63
|
-
} =
|
|
63
|
+
} = schema;
|
|
64
64
|
const nodeOrMarkName = new Set();
|
|
65
65
|
slice.content.forEach(node => {
|
|
66
66
|
if (node.type === paragraph && node.content.size === 0) {
|
|
@@ -99,20 +99,18 @@ export function getMediaTraceId(slice) {
|
|
|
99
99
|
});
|
|
100
100
|
return traceId;
|
|
101
101
|
}
|
|
102
|
-
function getActionSubjectId(
|
|
102
|
+
function getActionSubjectId({
|
|
103
|
+
selection,
|
|
104
|
+
schema
|
|
105
|
+
}) {
|
|
103
106
|
const {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
listItem,
|
|
110
|
-
taskItem,
|
|
111
|
-
decisionItem
|
|
112
|
-
}
|
|
113
|
-
}
|
|
107
|
+
nodes: {
|
|
108
|
+
paragraph,
|
|
109
|
+
listItem,
|
|
110
|
+
taskItem,
|
|
111
|
+
decisionItem
|
|
114
112
|
}
|
|
115
|
-
} =
|
|
113
|
+
} = schema;
|
|
116
114
|
const parent = findParentNode(node => {
|
|
117
115
|
if (node.type !== paragraph && node.type !== listItem && node.type !== taskItem && node.type !== decisionItem) {
|
|
118
116
|
return true;
|
|
@@ -156,51 +154,62 @@ function createPastePayload(actionSubjectId, attributes, linkDomain) {
|
|
|
156
154
|
} : {})
|
|
157
155
|
};
|
|
158
156
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const mediaTraceId = getMediaTraceId(slice);
|
|
166
|
-
|
|
167
|
-
// If we have a link among the pasted content, grab the
|
|
168
|
-
// domain and send it up with the analytics event
|
|
169
|
-
if (content === PasteContents.url || content === PasteContents.mixed) {
|
|
170
|
-
mapSlice(slice, node => {
|
|
171
|
-
const linkMark = node.marks.find(mark => mark.type.name === 'link');
|
|
172
|
-
if (linkMark) {
|
|
173
|
-
linkUrls.push(linkMark.attrs.href);
|
|
174
|
-
}
|
|
175
|
-
return node;
|
|
157
|
+
function createPasteAnalyticsPayloadBySelection(event, slice, pasteContext) {
|
|
158
|
+
return selection => {
|
|
159
|
+
const text = event.clipboardData ? event.clipboardData.getData('text/plain') || event.clipboardData.getData('text/uri-list') : '';
|
|
160
|
+
const actionSubjectId = getActionSubjectId({
|
|
161
|
+
selection: selection,
|
|
162
|
+
schema: selection.$from.doc.type.schema
|
|
176
163
|
});
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
164
|
+
const pasteSize = slice.size;
|
|
165
|
+
const content = getContent({
|
|
166
|
+
schema: selection.$from.doc.type.schema,
|
|
167
|
+
slice
|
|
168
|
+
});
|
|
169
|
+
const linkUrls = [];
|
|
170
|
+
const mediaTraceId = getMediaTraceId(slice);
|
|
171
|
+
|
|
172
|
+
// If we have a link among the pasted content, grab the
|
|
173
|
+
// domain and send it up with the analytics event
|
|
174
|
+
if (content === PasteContents.url || content === PasteContents.mixed) {
|
|
175
|
+
mapSlice(slice, node => {
|
|
176
|
+
const linkMark = node.marks.find(mark => mark.type.name === 'link');
|
|
177
|
+
if (linkMark) {
|
|
178
|
+
linkUrls.push(linkMark.attrs.href);
|
|
179
|
+
}
|
|
180
|
+
return node;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
if (pasteContext.asPlain) {
|
|
184
|
+
return createPasteAsPlainPayload(actionSubjectId, text, linkUrls.length);
|
|
185
|
+
}
|
|
186
|
+
const source = getPasteSource(event);
|
|
187
|
+
if (pasteContext.type === PasteTypes.plain) {
|
|
188
|
+
return createPastePayload(actionSubjectId, {
|
|
189
|
+
pasteSize: text.length,
|
|
190
|
+
type: pasteContext.type,
|
|
191
|
+
content: PasteContents.text,
|
|
192
|
+
source,
|
|
193
|
+
hyperlinkPasteOnText: false,
|
|
194
|
+
linksInPasteCount: linkUrls.length,
|
|
195
|
+
pasteSplitList: pasteContext.pasteSplitList
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
const linkDomains = linkUrls.map(getLinkDomain);
|
|
183
199
|
return createPastePayload(actionSubjectId, {
|
|
184
|
-
pasteSize: text.length,
|
|
185
200
|
type: pasteContext.type,
|
|
186
|
-
|
|
201
|
+
pasteSize,
|
|
202
|
+
content,
|
|
187
203
|
source,
|
|
188
|
-
hyperlinkPasteOnText:
|
|
204
|
+
hyperlinkPasteOnText: !!pasteContext.hyperlinkPasteOnText,
|
|
189
205
|
linksInPasteCount: linkUrls.length,
|
|
206
|
+
mediaTraceId,
|
|
190
207
|
pasteSplitList: pasteContext.pasteSplitList
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
pasteSize,
|
|
197
|
-
content,
|
|
198
|
-
source,
|
|
199
|
-
hyperlinkPasteOnText: !!pasteContext.hyperlinkPasteOnText,
|
|
200
|
-
linksInPasteCount: linkUrls.length,
|
|
201
|
-
mediaTraceId,
|
|
202
|
-
pasteSplitList: pasteContext.pasteSplitList
|
|
203
|
-
}, linkDomains);
|
|
208
|
+
}, linkDomains);
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
export function createPasteAnalyticsPayload(view, event, slice, pasteContext) {
|
|
212
|
+
return createPasteAnalyticsPayloadBySelection(event, slice, pasteContext)(view.state.selection);
|
|
204
213
|
}
|
|
205
214
|
|
|
206
215
|
// TODO: ED-6612 We should not dispatch only analytics, it's preferred to wrap each command with his own analytics.
|
|
@@ -213,57 +222,80 @@ export function sendPasteAnalyticsEvent(view, event, slice, pasteContext) {
|
|
|
213
222
|
export function pasteCommandWithAnalytics(view, event, slice, pasteContext) {
|
|
214
223
|
return withAnalytics(() => createPasteAnalyticsPayload(view, event, slice, pasteContext));
|
|
215
224
|
}
|
|
216
|
-
export const handlePasteAsPlainTextWithAnalytics = (view, event, slice) =>
|
|
225
|
+
export const handlePasteAsPlainTextWithAnalytics = (view, event, slice) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
217
226
|
type: PasteTypes.plain,
|
|
218
227
|
asPlain: true
|
|
219
|
-
}))(slice, event);
|
|
220
|
-
export const handlePasteIntoTaskAndDecisionWithAnalytics = (view, event, slice, type) =>
|
|
221
|
-
type
|
|
222
|
-
}))(slice);
|
|
223
|
-
export const handlePasteIntoCaptionWithAnalytics = (view, event, slice, type) =>
|
|
224
|
-
type
|
|
225
|
-
}))(slice);
|
|
226
|
-
export const handleCodeBlockWithAnalytics = (view, event, slice, text) =>
|
|
228
|
+
}))(handlePasteAsPlainText(slice, event));
|
|
229
|
+
export const handlePasteIntoTaskAndDecisionWithAnalytics = (view, event, slice, type) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
230
|
+
type
|
|
231
|
+
}))(handlePasteIntoTaskOrDecisionOrPanel(slice));
|
|
232
|
+
export const handlePasteIntoCaptionWithAnalytics = (view, event, slice, type) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
233
|
+
type
|
|
234
|
+
}))(handlePasteIntoCaption(slice));
|
|
235
|
+
export const handleCodeBlockWithAnalytics = (view, event, slice, text) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
227
236
|
type: PasteTypes.plain
|
|
228
|
-
}))(text);
|
|
229
|
-
export const handleMediaSingleWithAnalytics = (view, event, slice, type) =>
|
|
237
|
+
}))(handleCodeBlock(text));
|
|
238
|
+
export const handleMediaSingleWithAnalytics = (view, event, slice, type) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
230
239
|
type
|
|
231
|
-
}))(slice);
|
|
232
|
-
export const handlePastePreservingMarksWithAnalytics = (view, event, slice, type) => {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
};
|
|
237
|
-
export const handleMarkdownWithAnalytics = (view, event, slice) => pipe(handleMarkdown, pasteCommandWithAnalytics(view, event, slice, {
|
|
240
|
+
}))(handleMediaSingle(INPUT_METHOD.CLIPBOARD)(slice));
|
|
241
|
+
export const handlePastePreservingMarksWithAnalytics = (view, event, slice, type) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
242
|
+
type
|
|
243
|
+
}))(handlePastePreservingMarks(slice));
|
|
244
|
+
export const handleMarkdownWithAnalytics = (view, event, slice) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
238
245
|
type: PasteTypes.markdown
|
|
239
|
-
}))(slice);
|
|
240
|
-
export const handleRichTextWithAnalytics = (view, event, slice) =>
|
|
246
|
+
}))(handleMarkdown(slice));
|
|
247
|
+
export const handleRichTextWithAnalytics = (view, event, slice) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
241
248
|
type: PasteTypes.richText
|
|
242
|
-
}))(slice);
|
|
243
|
-
|
|
249
|
+
}))(handleRichText(slice));
|
|
250
|
+
function injectAnalyticsPayloadBeforeCommand(createPayloadByTransaction) {
|
|
251
|
+
return mainCommand => {
|
|
252
|
+
return (state, dispatch, view) => {
|
|
253
|
+
let originalTransaction = state.tr;
|
|
254
|
+
const fakeDispatch = tr => {
|
|
255
|
+
originalTransaction = tr;
|
|
256
|
+
};
|
|
257
|
+
const result = mainCommand(state, fakeDispatch, view);
|
|
258
|
+
if (!result) {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
if (dispatch && originalTransaction.docChanged) {
|
|
262
|
+
// it needs to know the selection before the changes
|
|
263
|
+
const payload = createPayloadByTransaction(state.selection);
|
|
264
|
+
addAnalytics(state, originalTransaction, payload);
|
|
265
|
+
dispatch(originalTransaction);
|
|
266
|
+
}
|
|
267
|
+
return true;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
export const handlePastePanelOrDecisionIntoListWithAnalytics = (view, event, slice) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
244
272
|
type: PasteTypes.richText
|
|
245
|
-
}))(slice);
|
|
246
|
-
export const handlePasteNonNestableBlockNodesIntoListWithAnalytics = (view, event, slice) =>
|
|
273
|
+
}))(handlePastePanelOrDecisionContentIntoList(slice));
|
|
274
|
+
export const handlePasteNonNestableBlockNodesIntoListWithAnalytics = (view, event, slice) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
247
275
|
type: PasteTypes.richText,
|
|
248
276
|
pasteSplitList: true
|
|
249
|
-
}))(slice);
|
|
250
|
-
export const handleExpandWithAnalytics = (view, event, slice) =>
|
|
251
|
-
type: PasteTypes.richText
|
|
252
|
-
|
|
253
|
-
|
|
277
|
+
}))(handlePasteNonNestableBlockNodesIntoList(slice));
|
|
278
|
+
export const handleExpandWithAnalytics = (view, event, slice) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
279
|
+
type: PasteTypes.richText,
|
|
280
|
+
pasteSplitList: true
|
|
281
|
+
}))(handleExpandPasteInTable(slice));
|
|
282
|
+
export const handleSelectedTableWithAnalytics = (view, event, slice) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
254
283
|
type: PasteTypes.richText
|
|
255
|
-
}))(slice);
|
|
256
|
-
export const handlePasteLinkOnSelectedTextWithAnalytics = (view, event, slice, type) =>
|
|
284
|
+
}))(handleSelectedTable(slice));
|
|
285
|
+
export const handlePasteLinkOnSelectedTextWithAnalytics = (view, event, slice, type) => injectAnalyticsPayloadBeforeCommand(createPasteAnalyticsPayloadBySelection(event, slice, {
|
|
257
286
|
type,
|
|
258
287
|
hyperlinkPasteOnText: true
|
|
259
|
-
}))(slice);
|
|
288
|
+
}))(handlePasteLinkOnSelectedText(slice));
|
|
260
289
|
export const createPasteMeasurePayload = ({
|
|
261
290
|
view,
|
|
262
291
|
duration,
|
|
263
292
|
content,
|
|
264
293
|
distortedDuration
|
|
265
294
|
}) => {
|
|
266
|
-
const pasteIntoNode = getActionSubjectId(
|
|
295
|
+
const pasteIntoNode = getActionSubjectId({
|
|
296
|
+
selection: view.state.selection,
|
|
297
|
+
schema: view.state.schema
|
|
298
|
+
});
|
|
267
299
|
return {
|
|
268
300
|
action: ACTION.PASTED_TIMED,
|
|
269
301
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
@@ -10,19 +10,19 @@ export function isPastedFromWord(html) {
|
|
|
10
10
|
export function isPastedFromExcel(html) {
|
|
11
11
|
return !!html && html.indexOf('urn:schemas-microsoft-com:office:excel') >= 0;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
function isPastedFromDropboxPaper(html) {
|
|
14
14
|
return !!html && !!html.match(/class=\"\s?author-d-.+"/gim);
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
function isPastedFromGoogleDocs(html) {
|
|
17
17
|
return !!html && !!html.match(/id=\"docs-internal-guid-.+"/gim);
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
function isPastedFromGoogleSpreadSheets(html) {
|
|
20
20
|
return !!html && !!html.match(/data-sheets-.+=/gim);
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
function isPastedFromPages(html) {
|
|
23
23
|
return !!html && html.indexOf('content="Cocoa HTML Writer"') >= 0;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
function isPastedFromFabricEditor(html) {
|
|
26
26
|
return !!html && html.indexOf('data-pm-slice="') >= 0;
|
|
27
27
|
}
|
|
28
28
|
export const isSingleLine = text => {
|
|
@@ -51,46 +51,6 @@ export function getPasteSource(event) {
|
|
|
51
51
|
return 'uncategorized';
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
// TODO: Write JEST tests for this part
|
|
55
|
-
export function isCode(str) {
|
|
56
|
-
const lines = str.split(/\r?\n|\r/);
|
|
57
|
-
if (3 > lines.length) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
let weight = 0;
|
|
61
|
-
lines.forEach(line => {
|
|
62
|
-
// Ends with : or ;
|
|
63
|
-
if (/[:;]$/.test(line)) {
|
|
64
|
-
weight++;
|
|
65
|
-
}
|
|
66
|
-
// Contains second and third braces
|
|
67
|
-
if (/[{}\[\]]/.test(line)) {
|
|
68
|
-
weight++;
|
|
69
|
-
}
|
|
70
|
-
// Contains <tag> or </
|
|
71
|
-
if (/<\w+>/.test(line) || /<\//.test(line)) {
|
|
72
|
-
weight++;
|
|
73
|
-
}
|
|
74
|
-
// Contains () <- function calls
|
|
75
|
-
if (/\(\)/.test(line)) {
|
|
76
|
-
weight++;
|
|
77
|
-
}
|
|
78
|
-
// Contains a link
|
|
79
|
-
if (/(^|[^!])\[(.*?)\]\((\S+)\)$/.test(line)) {
|
|
80
|
-
weight--;
|
|
81
|
-
}
|
|
82
|
-
// New line starts with less than two chars. e.g- if, {, <, etc
|
|
83
|
-
const token = /^(\s+)[a-zA-Z<{]{2,}/.exec(line);
|
|
84
|
-
if (token && 2 <= token[1].length) {
|
|
85
|
-
weight++;
|
|
86
|
-
}
|
|
87
|
-
if (/&&/.test(line)) {
|
|
88
|
-
weight++;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
return 4 <= weight && weight >= 0.5 * lines.length;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
54
|
// @see https://product-fabric.atlassian.net/browse/ED-3159
|
|
95
55
|
// @see https://github.com/markdown-it/markdown-it/issues/38
|
|
96
56
|
export function escapeLinks(text) {
|
|
@@ -68,10 +68,6 @@ export const IconPanel = Loadable({
|
|
|
68
68
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-icon-panel" */'./panel').then(module => module.default),
|
|
69
69
|
loading: () => null
|
|
70
70
|
});
|
|
71
|
-
export const IconCustomPanel = Loadable({
|
|
72
|
-
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-icon-custon-panel" */'./custom-panel').then(module => module.default),
|
|
73
|
-
loading: () => null
|
|
74
|
-
});
|
|
75
71
|
export const IconQuote = Loadable({
|
|
76
72
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-icon-quote" */'./quote').then(module => module.default),
|
|
77
73
|
loading: () => null
|
|
@@ -80,10 +76,6 @@ export const IconStatus = Loadable({
|
|
|
80
76
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-icon-status" */'./status').then(module => module.default),
|
|
81
77
|
loading: () => null
|
|
82
78
|
});
|
|
83
|
-
export const IconFallback = Loadable({
|
|
84
|
-
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-icon-fallback" */'./fallback').then(module => module.default),
|
|
85
|
-
loading: () => null
|
|
86
|
-
});
|
|
87
79
|
function importHeading(level) {
|
|
88
80
|
switch (level) {
|
|
89
81
|
case 1:
|
|
@@ -1,63 +1,16 @@
|
|
|
1
1
|
import { NodeSelection, Selection, TextSelection } from 'prosemirror-state';
|
|
2
|
-
import { findDomRefAtPos, removeNodeBefore } from 'prosemirror-utils';
|
|
2
|
+
import { findDomRefAtPos, findPositionOfNodeBefore, removeNodeBefore } from 'prosemirror-utils';
|
|
3
3
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { Direction, isBackward, isForward } from './direction';
|
|
5
5
|
import { GapCursorSelection, Side } from './selection';
|
|
6
|
-
import {
|
|
6
|
+
import { isTextBlockNearPos } from './utils';
|
|
7
7
|
import { isValidTargetNode } from './utils/is-valid-target-node';
|
|
8
8
|
import { atTheBeginningOfDoc, atTheEndOfDoc } from '../../../utils/prosemirror/position';
|
|
9
9
|
import { gapCursorPluginKey } from '../pm-plugins/gap-cursor-plugin-key';
|
|
10
10
|
import { isPositionNearTableRow } from '../../../utils/table';
|
|
11
|
-
|
|
12
|
-
[Direction.LEFT]: -1,
|
|
13
|
-
[Direction.RIGHT]: 1,
|
|
14
|
-
[Direction.UP]: -1,
|
|
15
|
-
[Direction.DOWN]: 1,
|
|
16
|
-
[Direction.BACKWARD]: -1,
|
|
17
|
-
[Direction.FORWARD]: 1
|
|
18
|
-
};
|
|
19
|
-
function shouldHandleMediaGapCursor(dir, state) {
|
|
20
|
-
const {
|
|
21
|
-
doc,
|
|
22
|
-
schema,
|
|
23
|
-
selection
|
|
24
|
-
} = state;
|
|
25
|
-
let $pos = isBackward(dir) ? selection.$from : selection.$to;
|
|
26
|
-
if (selection instanceof TextSelection) {
|
|
27
|
-
// Should not use gap cursor if I am moving from a text selection into a media node
|
|
28
|
-
if (dir === Direction.UP && !atTheBeginningOfDoc(state) || dir === Direction.DOWN && !atTheEndOfDoc(state)) {
|
|
29
|
-
const media = getMediaNearPos(doc, $pos, schema, mapDirection[dir]);
|
|
30
|
-
if (media) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Should not use gap cursor if I am moving from a text selection into a media node with layout wrap-right or wrap-left
|
|
36
|
-
if (dir === Direction.LEFT || dir === Direction.RIGHT) {
|
|
37
|
-
const media = getMediaNearPos(doc, $pos, schema, mapDirection[dir]);
|
|
38
|
-
const {
|
|
39
|
-
mediaSingle
|
|
40
|
-
} = schema.nodes;
|
|
41
|
-
if (media && media.type === mediaSingle && (media.attrs.layout === 'wrap-right' || media.attrs.layout === 'wrap-left')) {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (selection instanceof NodeSelection) {
|
|
47
|
-
// Should not use gap cursor if I am moving left/right from media node with layout wrap right or wrap-left
|
|
48
|
-
if (dir === Direction.LEFT || dir === Direction.RIGHT) {
|
|
49
|
-
const maybeMedia = doc.nodeAt(selection.$from.pos);
|
|
50
|
-
const {
|
|
51
|
-
mediaSingle
|
|
52
|
-
} = schema.nodes;
|
|
53
|
-
if (maybeMedia && maybeMedia.type === mediaSingle && (maybeMedia.attrs.layout === 'wrap-right' || maybeMedia.attrs.layout === 'wrap-left')) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
11
|
+
import { isMediaNode, isNodeBeforeMediaNode } from '@atlaskit/editor-common/utils';
|
|
60
12
|
export const shouldSkipGapCursor = (direction, state, $pos) => {
|
|
13
|
+
var _$pos$nodeBefore;
|
|
61
14
|
const {
|
|
62
15
|
doc,
|
|
63
16
|
schema
|
|
@@ -67,13 +20,52 @@ export const shouldSkipGapCursor = (direction, state, $pos) => {
|
|
|
67
20
|
if (atTheBeginningOfDoc(state)) {
|
|
68
21
|
return false;
|
|
69
22
|
}
|
|
70
|
-
return isPositionNearTableRow($pos, schema, 'before') || isTextBlockNearPos(doc, schema, $pos, -1);
|
|
23
|
+
return isPositionNearTableRow($pos, schema, 'before') || isTextBlockNearPos(doc, schema, $pos, -1) || isNodeBeforeMediaNode($pos, state);
|
|
71
24
|
case Direction.DOWN:
|
|
72
|
-
return atTheEndOfDoc(state) || isTextBlockNearPos(doc, schema, $pos, 1) || isPositionNearTableRow($pos, schema, 'after')
|
|
25
|
+
return atTheEndOfDoc(state) || isTextBlockNearPos(doc, schema, $pos, 1) || isPositionNearTableRow($pos, schema, 'after') || ((_$pos$nodeBefore = $pos.nodeBefore) === null || _$pos$nodeBefore === void 0 ? void 0 : _$pos$nodeBefore.type.name) === 'text' && !$pos.nodeAfter // end of a paragraph
|
|
26
|
+
;
|
|
27
|
+
|
|
73
28
|
default:
|
|
74
29
|
return false;
|
|
75
30
|
}
|
|
76
31
|
};
|
|
32
|
+
|
|
33
|
+
// These cases should be handled using the handleMediaGapCursor function
|
|
34
|
+
function shouldHandleMediaGapCursor(dir, state) {
|
|
35
|
+
var _selection$$from$node;
|
|
36
|
+
const {
|
|
37
|
+
selection
|
|
38
|
+
} = state;
|
|
39
|
+
const upArrowFromGapCursorIntoMedia = selection instanceof GapCursorSelection && dir === Direction.UP && selection.$from.nodeBefore && isMediaNode(selection.$from.nodeBefore);
|
|
40
|
+
const downArrowFromGapCursorIntoMediaGroup = selection instanceof GapCursorSelection && dir === Direction.DOWN && ((_selection$$from$node = selection.$from.nodeAfter) === null || _selection$$from$node === void 0 ? void 0 : _selection$$from$node.type.name) === 'mediaGroup';
|
|
41
|
+
return upArrowFromGapCursorIntoMedia || downArrowFromGapCursorIntoMediaGroup;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Handle media gap cursor for up/down arrow into media nodes
|
|
45
|
+
// Should check this case by using shouldHandleMediaGapCursor first
|
|
46
|
+
function handleMediaGapCursor(dir, state) {
|
|
47
|
+
const {
|
|
48
|
+
selection,
|
|
49
|
+
tr
|
|
50
|
+
} = state;
|
|
51
|
+
let $pos = isBackward(dir) ? selection.$from : selection.$to;
|
|
52
|
+
if (dir === Direction.UP && selection.$from.nodeBefore && isMediaNode(selection.$from.nodeBefore)) {
|
|
53
|
+
var _tr$doc$nodeAt;
|
|
54
|
+
const nodeBeforePos = findPositionOfNodeBefore(tr.selection);
|
|
55
|
+
if (nodeBeforePos && selection.side === 'right' && ((_tr$doc$nodeAt = tr.doc.nodeAt(nodeBeforePos)) === null || _tr$doc$nodeAt === void 0 ? void 0 : _tr$doc$nodeAt.type.name) === 'mediaSingle') {
|
|
56
|
+
tr.setSelection(new NodeSelection(tr.doc.resolve(nodeBeforePos))).scrollIntoView();
|
|
57
|
+
} else if (nodeBeforePos || nodeBeforePos === 0) {
|
|
58
|
+
tr.setSelection(new GapCursorSelection(tr.doc.resolve(nodeBeforePos), Side.LEFT)).scrollIntoView();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (dir === Direction.DOWN && selection.$from.nodeAfter) {
|
|
62
|
+
const nodeAfterPos = selection.side === 'right' ? $pos.pos : $pos.pos + selection.$from.nodeAfter.nodeSize;
|
|
63
|
+
if (nodeAfterPos) {
|
|
64
|
+
tr.setSelection(new GapCursorSelection(tr.doc.resolve(nodeAfterPos), Side.LEFT)).scrollIntoView();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return tr;
|
|
68
|
+
}
|
|
77
69
|
export const arrow = (dir, endOfTextblock) => (state, dispatch, view) => {
|
|
78
70
|
const {
|
|
79
71
|
doc,
|
|
@@ -103,13 +95,21 @@ export const arrow = (dir, endOfTextblock) => (state, dispatch, view) => {
|
|
|
103
95
|
if (selection.node.isInline) {
|
|
104
96
|
return false;
|
|
105
97
|
}
|
|
106
|
-
if (dir === Direction.UP || dir === Direction.DOWN) {
|
|
98
|
+
if (dir === Direction.UP && !atTheBeginningOfDoc(state) && !isNodeBeforeMediaNode($pos, state) || dir === Direction.DOWN) {
|
|
107
99
|
// We dont add gap cursor on node selections going up and down
|
|
100
|
+
// Except we do if we're going up for a block node which is the
|
|
101
|
+
// first node in the document OR the node before is a media node
|
|
108
102
|
return false;
|
|
109
103
|
}
|
|
110
104
|
}
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
|
|
106
|
+
// Handle media gap cursor for up/down arrow into media nodes
|
|
107
|
+
if (shouldHandleMediaGapCursor(dir, state)) {
|
|
108
|
+
const updatedTr = handleMediaGapCursor(dir, state);
|
|
109
|
+
if (dispatch) {
|
|
110
|
+
dispatch(updatedTr);
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
// when jumping between block nodes at the same depth, we need to reverse cursor without changing ProseMirror position
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeSelection
|
|
1
|
+
import { NodeSelection } from 'prosemirror-state';
|
|
2
2
|
export const mayGetStatusAtSelection = selection => {
|
|
3
3
|
if (selection && selection instanceof NodeSelection) {
|
|
4
4
|
const nodeSelection = selection;
|
|
@@ -8,15 +8,5 @@ export const mayGetStatusAtSelection = selection => {
|
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
11
|
-
export const mayGetStatusAtPos = (pos, doc) => {
|
|
12
|
-
if (pos) {
|
|
13
|
-
const node = doc.nodeAt(pos);
|
|
14
|
-
if (node && node.type.name === 'status') {
|
|
15
|
-
return node.attrs;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return null;
|
|
19
|
-
};
|
|
20
11
|
export const isEmptyStatus = node => node && (node.text && node.text.trim().length === 0 || node.text === '');
|
|
21
|
-
export const setSelectionNearPos = (tr, pos) => tr.setSelection(Selection.near(tr.doc.resolve(tr.mapping.map(pos))));
|
|
22
12
|
export const setNodeSelectionNearPos = (tr, pos) => tr.setSelection(NodeSelection.create(tr.doc, tr.mapping.map(pos)));
|
|
@@ -5,7 +5,7 @@ import { DEFAULT_BORDER_COLOR } from '../../../ui/ColorPalette/Palettes/common';
|
|
|
5
5
|
import { DEFAULT_COLOR, getActiveColor } from '../utils/color';
|
|
6
6
|
import { getDisabledState } from '../utils/disabled';
|
|
7
7
|
export { DEFAULT_COLOR } from '../utils/color';
|
|
8
|
-
|
|
8
|
+
function createInitialPluginState(editorState, pluginConfig) {
|
|
9
9
|
const defaultColor = (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.defaultColor) || DEFAULT_COLOR;
|
|
10
10
|
const palette = [{
|
|
11
11
|
value: defaultColor.color,
|
|
@@ -8,7 +8,7 @@ import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu';
|
|
|
8
8
|
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
9
9
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
11
|
-
import ColorPalette from '../../../../ui/ColorPalette';
|
|
11
|
+
import ColorPalette, { textPaletteTooltipMessages } from '../../../../ui/ColorPalette';
|
|
12
12
|
import Dropdown from '../../../../ui/Dropdown';
|
|
13
13
|
import { expandIconWrapperStyle, wrapperStyle, separatorStyles, triggerWrapperStyles } from '../../../../ui/styles';
|
|
14
14
|
import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
|
|
@@ -210,12 +210,14 @@ export class ToolbarTextColor extends React.Component {
|
|
|
210
210
|
}, jsx("div", {
|
|
211
211
|
"data-testid": "text-color-palette"
|
|
212
212
|
}, jsx(ColorPalette, {
|
|
213
|
-
palette: palette,
|
|
214
213
|
onClick: color => this.changeTextColor(color, pluginState.disabled),
|
|
215
214
|
selectedColor: pluginState.color,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
paletteOptions: {
|
|
216
|
+
palette,
|
|
217
|
+
hexToPaletteColor: hexToEditorTextPaletteColor,
|
|
218
|
+
paletteColorTooltipMessages: textPaletteTooltipMessages,
|
|
219
|
+
showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
|
|
220
|
+
}
|
|
219
221
|
}))), jsx("span", {
|
|
220
222
|
css: separatorStyles
|
|
221
223
|
}));
|
|
@@ -12,14 +12,19 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, PUNC, SYMBOL } f
|
|
|
12
12
|
function replaceTextUsingCaptureGroup(text) {
|
|
13
13
|
return (state, match, start, end) => {
|
|
14
14
|
const [, prefix,, suffix] = match;
|
|
15
|
-
const replacement =
|
|
15
|
+
const replacement = text + (suffix || '');
|
|
16
16
|
let {
|
|
17
17
|
tr,
|
|
18
18
|
selection: {
|
|
19
19
|
$to
|
|
20
20
|
}
|
|
21
21
|
} = state;
|
|
22
|
-
|
|
22
|
+
const startPos = start + (prefix || '').length;
|
|
23
|
+
const safePos = Math.min(
|
|
24
|
+
// I know it is almost impossible to have a negative value at this point.
|
|
25
|
+
// But, this is JS #trustnoone
|
|
26
|
+
Math.max(startPos, 0), end);
|
|
27
|
+
tr.replaceWith(safePos, end, state.schema.text(replacement, $to.marks()));
|
|
23
28
|
tr.setSelection(Selection.near(tr.doc.resolve(tr.selection.to)));
|
|
24
29
|
return tr;
|
|
25
30
|
};
|
|
@@ -67,6 +72,7 @@ function createSingleQuotesRules() {
|
|
|
67
72
|
// apostrophe
|
|
68
73
|
createReplacementRule('’', /(\w+)(')(\w+)$/)];
|
|
69
74
|
}
|
|
75
|
+
|
|
70
76
|
/**
|
|
71
77
|
* Get replacement rules related to product
|
|
72
78
|
*/
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
2
2
|
import { FORMATTING_MARK_TYPES, FORMATTING_NODE_TYPES } from './commands/clear-formatting';
|
|
3
|
-
export const nodeLen = node => {
|
|
4
|
-
return node.nodeType === 3 && node.nodeValue ? node.nodeValue.length : node.childNodes.length;
|
|
5
|
-
};
|
|
6
|
-
export const isIgnorable = dom => dom.pmViewDesc && dom.pmViewDesc.size === 0;
|
|
7
|
-
export const isBlockNode = dom => {
|
|
8
|
-
const desc = dom.pmViewDesc;
|
|
9
|
-
return desc && desc.node && desc.node.isBlock;
|
|
10
|
-
};
|
|
11
|
-
export const domIndex = function (node) {
|
|
12
|
-
if (node) {
|
|
13
|
-
for (let index = 0;; index++) {
|
|
14
|
-
node = node.previousSibling;
|
|
15
|
-
if (!node) {
|
|
16
|
-
return index;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return;
|
|
21
|
-
};
|
|
22
3
|
export const hasCode = (state, pos) => {
|
|
23
4
|
const {
|
|
24
5
|
code
|
|
@@ -2,11 +2,6 @@ export const TYPE_AHEAD_DECORATION_KEY = 'typeahead_decoration_key';
|
|
|
2
2
|
export const TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = 'typeaheadDecoration';
|
|
3
3
|
export const TYPE_AHEAD_POPUP_CONTENT_CLASS = 'fabric-editor-typeahead';
|
|
4
4
|
export const TYPE_AHEAD_DECORATION_ELEMENT_ID = 'typeahaed_decoration_element_id';
|
|
5
|
-
export let NavigationDirection;
|
|
6
|
-
(function (NavigationDirection) {
|
|
7
|
-
NavigationDirection[NavigationDirection["LEFT"] = -1] = "LEFT";
|
|
8
|
-
NavigationDirection[NavigationDirection["RIGHT"] = 1] = "RIGHT";
|
|
9
|
-
})(NavigationDirection || (NavigationDirection = {}));
|
|
10
5
|
export let CloseSelectionOptions;
|
|
11
6
|
(function (CloseSelectionOptions) {
|
|
12
7
|
CloseSelectionOptions["BEFORE_TEXT_INSERTED"] = "BEFORE_TEXT_INSERTED";
|