@atlaskit/editor-core 151.1.2 → 152.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 +112 -0
- package/dist/cjs/create-editor/ReactEditorView.js +22 -8
- package/dist/cjs/create-editor/create-plugins-list.js +30 -11
- package/dist/cjs/labs/next/presets/cxhtml.js +1 -2
- package/dist/cjs/labs/next/presets/default.js +3 -1
- package/dist/cjs/nodeviews/ReactNodeView.js +2 -2
- package/dist/cjs/nodeviews/SelectionBasedNodeView.js +6 -0
- package/dist/cjs/plugins/analytics/types/enums.js +1 -0
- package/dist/cjs/plugins/annotation/utils.js +19 -8
- package/dist/cjs/plugins/avatar-group/index.js +2 -1
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/cjs/plugins/before-primaryToolbar/index.js +26 -0
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +28 -0
- package/dist/cjs/plugins/code-bidi-warning/index.js +5 -2
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/main.js +12 -3
- package/dist/cjs/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +15 -5
- package/dist/cjs/plugins/code-block/index.js +3 -3
- package/dist/cjs/plugins/code-block/nodeviews/highlighting-code-block.js +6 -3
- package/dist/cjs/plugins/code-block/pm-plugins/main.js +11 -3
- package/dist/cjs/plugins/extension/extension-api.js +10 -2
- package/dist/cjs/plugins/extension/ui/styles.js +1 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +172 -0
- package/dist/cjs/plugins/find-replace/index.js +14 -137
- package/dist/cjs/plugins/find-replace/ui/Find.js +16 -9
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +9 -2
- package/dist/cjs/plugins/find-replace/ui/Replace.js +11 -3
- package/dist/cjs/plugins/find-replace/ui/styles.js +44 -35
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/cjs/plugins/fragment/index.js +34 -0
- package/dist/cjs/plugins/fragment/plugin-key.js +11 -0
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/plugins/index.js +16 -0
- package/dist/cjs/plugins/list/actions/conversions.js +39 -71
- package/dist/cjs/plugins/list/transforms.js +7 -1
- package/dist/cjs/plugins/media/index.js +2 -3
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +3 -1
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +12 -5
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +6 -4
- package/dist/cjs/plugins/media/nodeviews/styles.js +6 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +49 -15
- package/dist/cjs/plugins/media/toolbar/commands.js +59 -0
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +7 -2
- package/dist/cjs/plugins/media/toolbar/index.js +90 -3
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/cjs/plugins/media/utils/media-common.js +1 -1
- package/dist/cjs/plugins/media/utils/media-files.js +5 -1
- package/dist/cjs/plugins/panel/actions.js +2 -2
- package/dist/cjs/plugins/panel/index.js +3 -3
- package/dist/cjs/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/cjs/plugins/panel/toolbar.js +10 -5
- package/dist/cjs/plugins/panel/utils.js +15 -0
- package/dist/cjs/plugins/rank.js +3 -2
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +49 -1
- package/dist/cjs/plugins/status/ui/statusPicker.js +4 -2
- package/dist/cjs/plugins/table/commands/insert.js +1 -0
- package/dist/cjs/plugins/table/index.js +3 -2
- package/dist/cjs/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -3
- package/dist/cjs/plugins/table/pm-plugins/main.js +26 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/cjs/plugins/table/transforms/column-width.js +14 -5
- package/dist/cjs/plugins/table/transforms/fix-tables.js +43 -6
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/cjs/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +1 -1
- package/dist/cjs/plugins/table/ui/messages.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/cjs/plugins/text-formatting/index.js +2 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +77 -26
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +32 -9
- package/dist/cjs/ui/ColorPalette/Color/index.js +8 -18
- package/dist/cjs/ui/ColorPalette/index.js +7 -4
- package/dist/cjs/ui/ColorPickerButton/index.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +114 -61
- package/dist/cjs/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/cjs/ui/ConfigPanel/transformers.js +490 -248
- package/dist/cjs/ui/ConfigPanel/utils.js +2 -10
- package/dist/cjs/ui/DropdownMenu/index.js +3 -1
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +1 -1
- package/dist/cjs/ui/Resizer/index.js +9 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +19 -8
- package/dist/es2019/create-editor/create-plugins-list.js +31 -12
- package/dist/es2019/labs/next/presets/cxhtml.js +1 -2
- package/dist/es2019/labs/next/presets/default.js +3 -1
- package/dist/es2019/nodeviews/ReactNodeView.js +1 -1
- package/dist/es2019/nodeviews/SelectionBasedNodeView.js +11 -0
- package/dist/es2019/plugins/analytics/types/enums.js +1 -0
- package/dist/es2019/plugins/annotation/utils.js +18 -7
- package/dist/es2019/plugins/avatar-group/index.js +2 -1
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +3 -2
- package/dist/es2019/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/es2019/plugins/code-bidi-warning/index.js +8 -2
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/main.js +12 -2
- package/dist/es2019/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +16 -5
- package/dist/es2019/plugins/code-block/index.js +3 -2
- package/dist/es2019/plugins/code-block/nodeviews/highlighting-code-block.js +6 -3
- package/dist/es2019/plugins/code-block/pm-plugins/main.js +11 -3
- package/dist/es2019/plugins/extension/extension-api.js +9 -2
- package/dist/es2019/plugins/extension/ui/styles.js +6 -0
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +152 -0
- package/dist/es2019/plugins/find-replace/index.js +15 -128
- package/dist/es2019/plugins/find-replace/ui/Find.js +18 -10
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +11 -3
- package/dist/es2019/plugins/find-replace/ui/Replace.js +12 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +37 -47
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +10 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/es2019/plugins/fragment/index.js +22 -0
- package/dist/es2019/plugins/fragment/plugin-key.js +2 -0
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/es2019/plugins/index.js +2 -0
- package/dist/es2019/plugins/list/actions/conversions.js +38 -69
- package/dist/es2019/plugins/list/transforms.js +5 -1
- package/dist/es2019/plugins/media/index.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +8 -4
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/es2019/plugins/media/nodeviews/styles.js +2 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +32 -17
- package/dist/es2019/plugins/media/toolbar/commands.js +47 -0
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/es2019/plugins/media/toolbar/index.js +90 -3
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +7 -1
- package/dist/es2019/plugins/media/utils/media-common.js +1 -1
- package/dist/es2019/plugins/media/utils/media-files.js +6 -1
- package/dist/es2019/plugins/panel/actions.js +2 -2
- package/dist/es2019/plugins/panel/index.js +5 -5
- package/dist/es2019/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/es2019/plugins/panel/toolbar.js +10 -5
- package/dist/es2019/plugins/panel/utils.js +8 -1
- package/dist/es2019/plugins/rank.js +3 -2
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +48 -1
- package/dist/es2019/plugins/status/ui/statusPicker.js +4 -2
- package/dist/es2019/plugins/table/commands/insert.js +1 -2
- package/dist/es2019/plugins/table/index.js +2 -1
- package/dist/es2019/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +25 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/es2019/plugins/table/transforms/column-width.js +13 -3
- package/dist/es2019/plugins/table/transforms/fix-tables.js +43 -5
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/es2019/plugins/table/ui/common-styles.css.js +5 -1
- package/dist/es2019/plugins/table/ui/consts.js +2 -2
- package/dist/es2019/plugins/table/ui/messages.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/es2019/plugins/text-formatting/index.js +3 -2
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +60 -27
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +51 -7
- package/dist/es2019/ui/ColorPalette/Color/index.js +9 -18
- package/dist/es2019/ui/ColorPalette/index.js +7 -4
- package/dist/es2019/ui/ColorPickerButton/index.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +101 -49
- package/dist/es2019/ui/ConfigPanel/FormContent.js +35 -26
- package/dist/es2019/ui/ConfigPanel/transformers.js +243 -72
- package/dist/es2019/ui/ConfigPanel/utils.js +1 -2
- package/dist/es2019/ui/Dropdown/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +7 -3
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/es2019/ui/Resizer/index.js +9 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +22 -8
- package/dist/esm/create-editor/create-plugins-list.js +31 -12
- package/dist/esm/labs/next/presets/cxhtml.js +1 -2
- package/dist/esm/labs/next/presets/default.js +3 -1
- package/dist/esm/nodeviews/ReactNodeView.js +2 -2
- package/dist/esm/nodeviews/SelectionBasedNodeView.js +7 -0
- package/dist/esm/plugins/analytics/types/enums.js +1 -0
- package/dist/esm/plugins/annotation/utils.js +18 -7
- package/dist/esm/plugins/avatar-group/index.js +2 -1
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +5 -2
- package/dist/esm/plugins/before-primaryToolbar/index.js +15 -0
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +12 -0
- package/dist/esm/plugins/code-bidi-warning/index.js +5 -2
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/main.js +12 -3
- package/dist/esm/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +15 -5
- package/dist/esm/plugins/code-block/index.js +3 -3
- package/dist/esm/plugins/code-block/nodeviews/highlighting-code-block.js +6 -3
- package/dist/esm/plugins/code-block/pm-plugins/main.js +11 -3
- package/dist/esm/plugins/extension/extension-api.js +9 -2
- package/dist/esm/plugins/extension/ui/styles.js +1 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +4 -2
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +155 -0
- package/dist/esm/plugins/find-replace/index.js +14 -131
- package/dist/esm/plugins/find-replace/ui/Find.js +17 -10
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +10 -3
- package/dist/esm/plugins/find-replace/ui/Replace.js +11 -4
- package/dist/esm/plugins/find-replace/ui/styles.js +39 -18
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +9 -4
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +1 -1
- package/dist/esm/plugins/fragment/index.js +22 -0
- package/dist/esm/plugins/fragment/plugin-key.js +2 -0
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
- package/dist/esm/plugins/index.js +2 -0
- package/dist/esm/plugins/list/actions/conversions.js +38 -71
- package/dist/esm/plugins/list/transforms.js +7 -1
- package/dist/esm/plugins/media/index.js +2 -3
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +11 -6
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +7 -5
- package/dist/esm/plugins/media/nodeviews/styles.js +2 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +47 -16
- package/dist/esm/plugins/media/toolbar/commands.js +45 -0
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +6 -2
- package/dist/esm/plugins/media/toolbar/index.js +88 -3
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +9 -1
- package/dist/esm/plugins/media/utils/media-common.js +1 -1
- package/dist/esm/plugins/media/utils/media-files.js +6 -1
- package/dist/esm/plugins/panel/actions.js +2 -2
- package/dist/esm/plugins/panel/index.js +5 -5
- package/dist/esm/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/esm/plugins/panel/toolbar.js +9 -4
- package/dist/esm/plugins/panel/utils.js +13 -0
- package/dist/esm/plugins/rank.js +3 -2
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +50 -1
- package/dist/esm/plugins/status/ui/statusPicker.js +4 -2
- package/dist/esm/plugins/table/commands/insert.js +1 -2
- package/dist/esm/plugins/table/index.js +3 -2
- package/dist/esm/plugins/table/nodeviews/OverflowShadowsObserver.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +27 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/colgroup.js +2 -2
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -0
- package/dist/esm/plugins/table/transforms/column-width.js +13 -3
- package/dist/esm/plugins/table/transforms/fix-tables.js +42 -4
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +3 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -0
- package/dist/esm/plugins/table/ui/common-styles.css.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +2 -2
- package/dist/esm/plugins/table/ui/messages.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -1
- package/dist/esm/plugins/text-formatting/index.js +3 -2
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +67 -27
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +20 -7
- package/dist/esm/ui/ColorPalette/Color/index.js +9 -16
- package/dist/esm/ui/ColorPalette/index.js +7 -4
- package/dist/esm/ui/ColorPickerButton/index.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +113 -62
- package/dist/esm/ui/ConfigPanel/FormContent.js +39 -26
- package/dist/esm/ui/ConfigPanel/transformers.js +488 -248
- package/dist/esm/ui/ConfigPanel/utils.js +1 -6
- package/dist/esm/ui/Dropdown/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +7 -3
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +1 -0
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +2 -2
- package/dist/esm/ui/Resizer/index.js +9 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/nodeviews/ReactNodeView.d.ts +1 -1
- package/dist/types/nodeviews/SelectionBasedNodeView.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +1 -0
- package/dist/types/plugins/analytics/types/events.d.ts +7 -1
- package/dist/types/plugins/annotation/utils.d.ts +1 -1
- package/dist/types/plugins/avatar-group/index.d.ts +1 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -0
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +5 -0
- package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +5 -0
- package/dist/types/plugins/code-bidi-warning/index.d.ts +4 -2
- package/dist/types/plugins/code-bidi-warning/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +2 -1
- package/dist/types/plugins/code-bidi-warning/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/code-block/index.d.ts +1 -1
- package/dist/types/plugins/code-block/nodeviews/highlighting-code-block.d.ts +12 -1
- package/dist/types/plugins/code-block/pm-plugins/main.d.ts +3 -1
- package/dist/types/plugins/code-block/types.d.ts +2 -0
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +15 -0
- package/dist/types/plugins/find-replace/index.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/Find.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/Replace.d.ts +1 -0
- package/dist/types/plugins/find-replace/ui/styles.d.ts +5 -14
- package/dist/types/plugins/floating-toolbar/ui/EmojiPickerButton.d.ts +1 -1
- package/dist/types/plugins/fragment/index.d.ts +5 -0
- package/dist/types/plugins/fragment/plugin-key.d.ts +2 -0
- package/dist/types/plugins/index.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +3 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/styles.d.ts +2 -0
- package/dist/types/plugins/media/toolbar/commands.d.ts +3 -0
- package/dist/types/plugins/media/toolbar/filePreviewItem.d.ts +2 -0
- package/dist/types/plugins/media/types.d.ts +0 -1
- package/dist/types/plugins/panel/actions.d.ts +1 -1
- package/dist/types/plugins/panel/types.d.ts +8 -2
- package/dist/types/plugins/quick-insert/index.d.ts +2 -1
- package/dist/types/plugins/table/commands/insert.d.ts +3 -0
- package/dist/types/plugins/table/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/types.d.ts +1 -0
- package/dist/types/plugins/table/transforms/column-width.d.ts +4 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +3 -2
- package/dist/types/plugins/table/types.d.ts +8 -0
- package/dist/types/plugins/table/ui/consts.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +11 -1
- package/dist/types/types/feature-flags.d.ts +13 -0
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +10 -1
- package/dist/types/ui/ColorPalette/Color/index.d.ts +8 -5
- package/dist/types/ui/ColorPalette/index.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/transformers.d.ts +7 -1
- package/dist/types/ui/ConfigPanel/utils.d.ts +0 -1
- package/dist/types/ui/Resizer/index.d.ts +1 -0
- package/package.json +35 -31
- package/dist/cjs/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -38
- package/dist/es2019/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/esm/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.js +0 -28
- package/dist/types/plugins/floating-toolbar/ui/EditorRemoveEmojiIcon.d.ts +0 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.removeInlineCard = exports.changeInlineToMediaCard = void 0;
|
|
7
|
+
|
|
8
|
+
var _prosemirrorState = require("prosemirror-state");
|
|
9
|
+
|
|
10
|
+
var _prosemirrorUtils = require("prosemirror-utils");
|
|
11
|
+
|
|
12
|
+
var changeInlineToMediaCard = function changeInlineToMediaCard(state, dispatch) {
|
|
13
|
+
var _state$schema$nodes = state.schema.nodes,
|
|
14
|
+
media = _state$schema$nodes.media,
|
|
15
|
+
mediaInline = _state$schema$nodes.mediaInline,
|
|
16
|
+
mediaGroup = _state$schema$nodes.mediaGroup;
|
|
17
|
+
var selectedNode = state.selection instanceof _prosemirrorState.NodeSelection && state.selection.node.type === mediaInline && state.selection.node;
|
|
18
|
+
|
|
19
|
+
if (!selectedNode) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var _selectedNode$attrs = selectedNode.attrs,
|
|
24
|
+
id = _selectedNode$attrs.id,
|
|
25
|
+
type = _selectedNode$attrs.type,
|
|
26
|
+
collection = _selectedNode$attrs.collection;
|
|
27
|
+
var mediaNode = media.createChecked({
|
|
28
|
+
id: id,
|
|
29
|
+
type: type,
|
|
30
|
+
collection: collection
|
|
31
|
+
});
|
|
32
|
+
var group = mediaGroup.createChecked({}, mediaNode);
|
|
33
|
+
var nodePos = state.tr.doc.resolve(state.selection.from).end();
|
|
34
|
+
var tr = state.tr;
|
|
35
|
+
tr = (0, _prosemirrorUtils.removeSelectedNode)(tr);
|
|
36
|
+
tr = (0, _prosemirrorUtils.safeInsert)(group, nodePos, true)(tr);
|
|
37
|
+
|
|
38
|
+
if (dispatch) {
|
|
39
|
+
dispatch(tr);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.changeInlineToMediaCard = changeInlineToMediaCard;
|
|
46
|
+
|
|
47
|
+
var removeInlineCard = function removeInlineCard(state, dispatch) {
|
|
48
|
+
if ((0, _prosemirrorUtils.isNodeSelection)(state.selection)) {
|
|
49
|
+
if (dispatch) {
|
|
50
|
+
dispatch((0, _prosemirrorUtils.removeSelectedNode)(state.tr));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return false;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.removeInlineCard = removeInlineCard;
|
|
@@ -17,6 +17,8 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
17
17
|
|
|
18
18
|
var _mediaViewer = require("@atlaskit/media-viewer");
|
|
19
19
|
|
|
20
|
+
var _mediaUi = require("@atlaskit/media-ui");
|
|
21
|
+
|
|
20
22
|
var _filePreview = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file-preview"));
|
|
21
23
|
|
|
22
24
|
var _Button = _interopRequireDefault(require("../../floating-toolbar/ui/Button"));
|
|
@@ -28,7 +30,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
28
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
31
|
|
|
30
32
|
var FilePreviewItem = function FilePreviewItem(_ref) {
|
|
31
|
-
var mediaPluginState = _ref.mediaPluginState
|
|
33
|
+
var mediaPluginState = _ref.mediaPluginState,
|
|
34
|
+
intl = _ref.intl;
|
|
32
35
|
|
|
33
36
|
var _useState = (0, _react.useState)(false),
|
|
34
37
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -73,13 +76,15 @@ var FilePreviewItem = function FilePreviewItem(_ref) {
|
|
|
73
76
|
};
|
|
74
77
|
|
|
75
78
|
var mediaViewer = renderMediaViewer();
|
|
79
|
+
var tooltipContent = intl.formatMessage(_mediaUi.messages.preview);
|
|
76
80
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
77
81
|
testId: "file-preview-toolbar-button",
|
|
78
82
|
key: "editor.media.card.preview",
|
|
79
83
|
onClick: openMediaViewer,
|
|
80
84
|
icon: /*#__PURE__*/_react.default.createElement(_filePreview.default, {
|
|
81
85
|
label: "file preview"
|
|
82
|
-
})
|
|
86
|
+
}),
|
|
87
|
+
tooltipContent: tooltipContent
|
|
83
88
|
}), mediaViewer);
|
|
84
89
|
};
|
|
85
90
|
|
|
@@ -57,6 +57,10 @@ var _utils = require("./utils");
|
|
|
57
57
|
|
|
58
58
|
var _prosemirrorModel = require("prosemirror-model");
|
|
59
59
|
|
|
60
|
+
var _commands = require("./commands");
|
|
61
|
+
|
|
62
|
+
var _styles = require("../nodeviews/styles");
|
|
63
|
+
|
|
60
64
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
61
65
|
|
|
62
66
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -113,6 +117,7 @@ var changeMediaCardToInline = function changeMediaCardToInline(state, dispatch)
|
|
|
113
117
|
var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar(state, intl, mediaPluginState) {
|
|
114
118
|
var mediaGroup = state.schema.nodes.mediaGroup;
|
|
115
119
|
var items = [{
|
|
120
|
+
id: 'editor.media.view.switcher',
|
|
116
121
|
type: 'dropdown',
|
|
117
122
|
title: intl.formatMessage(_mediaUi.messages.displayThumbnail),
|
|
118
123
|
options: [{
|
|
@@ -136,7 +141,8 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
136
141
|
render: function render() {
|
|
137
142
|
return /*#__PURE__*/_react.default.createElement(_filePreviewItem.FilePreviewItem, {
|
|
138
143
|
key: "editor.media.card.preview",
|
|
139
|
-
mediaPluginState: mediaPluginState
|
|
144
|
+
mediaPluginState: mediaPluginState,
|
|
145
|
+
intl: intl
|
|
140
146
|
});
|
|
141
147
|
}
|
|
142
148
|
}, {
|
|
@@ -168,6 +174,66 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
168
174
|
return items;
|
|
169
175
|
};
|
|
170
176
|
|
|
177
|
+
var generateMediaInlineFloatingToolbar = function generateMediaInlineFloatingToolbar(state, intl, mediaPluginState) {
|
|
178
|
+
var mediaInline = state.schema.nodes.mediaInline;
|
|
179
|
+
var items = [{
|
|
180
|
+
id: 'editor.media.view.switcher',
|
|
181
|
+
type: 'dropdown',
|
|
182
|
+
title: intl.formatMessage(_messages2.messages.inline),
|
|
183
|
+
options: [{
|
|
184
|
+
title: intl.formatMessage(_messages2.messages.inline),
|
|
185
|
+
selected: true,
|
|
186
|
+
onClick: function onClick() {
|
|
187
|
+
return true;
|
|
188
|
+
},
|
|
189
|
+
testId: 'inline-appearance'
|
|
190
|
+
}, {
|
|
191
|
+
title: intl.formatMessage(_mediaUi.messages.displayThumbnail),
|
|
192
|
+
selected: false,
|
|
193
|
+
onClick: _commands.changeInlineToMediaCard,
|
|
194
|
+
testId: 'thumbnail-appearance'
|
|
195
|
+
}]
|
|
196
|
+
}, {
|
|
197
|
+
type: 'separator'
|
|
198
|
+
}, {
|
|
199
|
+
type: 'custom',
|
|
200
|
+
fallback: [],
|
|
201
|
+
render: function render() {
|
|
202
|
+
return /*#__PURE__*/_react.default.createElement(_filePreviewItem.FilePreviewItem, {
|
|
203
|
+
key: "editor.media.card.preview",
|
|
204
|
+
mediaPluginState: mediaPluginState,
|
|
205
|
+
intl: intl
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}, {
|
|
209
|
+
type: 'separator'
|
|
210
|
+
}, {
|
|
211
|
+
id: 'editor.media.card.download',
|
|
212
|
+
type: 'button',
|
|
213
|
+
icon: _download.default,
|
|
214
|
+
onClick: function onClick() {
|
|
215
|
+
(0, _utils.downloadMedia)(mediaPluginState);
|
|
216
|
+
return true;
|
|
217
|
+
},
|
|
218
|
+
title: intl.formatMessage(_mediaUi.messages.download)
|
|
219
|
+
}, {
|
|
220
|
+
type: 'separator'
|
|
221
|
+
}, {
|
|
222
|
+
id: 'editor.media.delete',
|
|
223
|
+
type: 'button',
|
|
224
|
+
appearance: 'danger',
|
|
225
|
+
icon: _remove.default,
|
|
226
|
+
onMouseEnter: (0, _decoration.hoverDecoration)(mediaInline, true),
|
|
227
|
+
onMouseLeave: (0, _decoration.hoverDecoration)(mediaInline, false),
|
|
228
|
+
onFocus: (0, _decoration.hoverDecoration)(mediaInline, true),
|
|
229
|
+
onBlur: (0, _decoration.hoverDecoration)(mediaInline, false),
|
|
230
|
+
title: intl.formatMessage(_messages.default.remove),
|
|
231
|
+
onClick: _commands.removeInlineCard,
|
|
232
|
+
testId: 'media-toolbar-remove-button'
|
|
233
|
+
}];
|
|
234
|
+
return items;
|
|
235
|
+
};
|
|
236
|
+
|
|
171
237
|
var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToolbar(state, intl, options, pluginState, mediaLinkingState) {
|
|
172
238
|
var mediaSingle = state.schema.nodes.mediaSingle;
|
|
173
239
|
var allowResizing = options.allowResizing,
|
|
@@ -314,9 +380,14 @@ var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
314
380
|
}
|
|
315
381
|
|
|
316
382
|
var items = [];
|
|
317
|
-
var
|
|
383
|
+
var parentMediaGroupNode = (0, _prosemirrorUtils.findParentNodeOfType)(mediaGroup)(state.selection);
|
|
384
|
+
var selectedNodeType;
|
|
385
|
+
|
|
386
|
+
if (state.selection instanceof _prosemirrorState.NodeSelection) {
|
|
387
|
+
selectedNodeType = state.selection.node.type;
|
|
388
|
+
}
|
|
318
389
|
|
|
319
|
-
if (allowMediaInline &&
|
|
390
|
+
if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
|
|
320
391
|
var mediaOffset = state.selection.$from.parentOffset + 1;
|
|
321
392
|
|
|
322
393
|
baseToolbar.getDomRef = function () {
|
|
@@ -327,7 +398,23 @@ var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
327
398
|
};
|
|
328
399
|
|
|
329
400
|
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState);
|
|
401
|
+
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
402
|
+
baseToolbar.getDomRef = function () {
|
|
403
|
+
var _mediaPluginState$ele2;
|
|
404
|
+
|
|
405
|
+
var element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(".".concat(_styles.MediaInlineNodeSelector));
|
|
406
|
+
return element || mediaPluginState.element;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState);
|
|
330
410
|
} else {
|
|
411
|
+
baseToolbar.getDomRef = function () {
|
|
412
|
+
var _mediaPluginState$ele3;
|
|
413
|
+
|
|
414
|
+
var element = (_mediaPluginState$ele3 = mediaPluginState.element) === null || _mediaPluginState$ele3 === void 0 ? void 0 : _mediaPluginState$ele3.querySelector(".".concat(_styles.MediaSingleNodeSelector));
|
|
415
|
+
return element || mediaPluginState.element;
|
|
416
|
+
};
|
|
417
|
+
|
|
331
418
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState);
|
|
332
419
|
}
|
|
333
420
|
|
|
@@ -450,7 +450,15 @@ var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
|
|
|
450
450
|
return columResizingPluginState ? !columResizingPluginState.dragging : true;
|
|
451
451
|
},
|
|
452
452
|
nodeType: "media",
|
|
453
|
-
dispatchAnalyticsEvent: this.props.dispatchAnalyticsEvent
|
|
453
|
+
dispatchAnalyticsEvent: this.props.dispatchAnalyticsEvent // when cursor is located below a media with caption,
|
|
454
|
+
// press “Up“ key will result cursor focus on an invalid position, (on the resize handler)
|
|
455
|
+
// This workaround adds an empty div inside the resize handler to prevent the issue.
|
|
456
|
+
,
|
|
457
|
+
handleComponentFunc: function handleComponentFunc() {
|
|
458
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
459
|
+
contentEditable: false
|
|
460
|
+
});
|
|
461
|
+
}
|
|
454
462
|
}), children));
|
|
455
463
|
}
|
|
456
464
|
}]);
|
|
@@ -334,7 +334,7 @@ var unwrapNestedMediaElements = function unwrapNestedMediaElements(html) {
|
|
|
334
334
|
// ProseMirror should handle this case properly.
|
|
335
335
|
|
|
336
336
|
|
|
337
|
-
if (mediaParent instanceof HTMLDivElement) {
|
|
337
|
+
if (mediaParent instanceof HTMLDivElement || mediaParent instanceof HTMLSpanElement && mediaParent.closest('[class*="emoji-common"]')) {
|
|
338
338
|
return;
|
|
339
339
|
} // Find the top most element that the parent has a valid container for the image.
|
|
340
340
|
// Stop just before found the wrapper
|
|
@@ -111,7 +111,11 @@ var insertMediaInlineNode = function insertMediaInlineNode(view, mediaState, col
|
|
|
111
111
|
collection: collection
|
|
112
112
|
});
|
|
113
113
|
var space = state.schema.text(' ');
|
|
114
|
-
var pos = state.selection.$to.pos;
|
|
114
|
+
var pos = state.selection.$to.pos; // If the selection is inside an empty list item set pos inside paragraph
|
|
115
|
+
|
|
116
|
+
if ((0, _utils.isInListItem)(state) && (0, _mediaCommon.isInsidePotentialEmptyParagraph)(state)) {
|
|
117
|
+
pos = pos + 1;
|
|
118
|
+
}
|
|
115
119
|
|
|
116
120
|
var content = _prosemirrorModel.Fragment.from([mediaInlineNode, space]); // Delete the selection if a selection is made
|
|
117
121
|
|
|
@@ -59,7 +59,7 @@ exports.removePanel = removePanel;
|
|
|
59
59
|
|
|
60
60
|
var changePanelType = function changePanelType(panelType) {
|
|
61
61
|
var panelOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
62
|
-
var
|
|
62
|
+
var allowCustomPanel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
63
63
|
return function (state, dispatch) {
|
|
64
64
|
var nodes = state.schema.nodes,
|
|
65
65
|
tr = state.tr;
|
|
@@ -73,7 +73,7 @@ var changePanelType = function changePanelType(panelType) {
|
|
|
73
73
|
var previousType = panelNode.node.attrs.panelType;
|
|
74
74
|
var newTr;
|
|
75
75
|
|
|
76
|
-
if (
|
|
76
|
+
if (allowCustomPanel) {
|
|
77
77
|
var previousColor = panelNode.node.attrs.panelColor || (0, _editorCommon.getPanelTypeBackground)(previousType);
|
|
78
78
|
var previousIcon = panelNode.node.attrs.panelIcon;
|
|
79
79
|
|
|
@@ -55,7 +55,7 @@ var panelPlugin = function panelPlugin() {
|
|
|
55
55
|
return {
|
|
56
56
|
name: 'panel',
|
|
57
57
|
nodes: function nodes() {
|
|
58
|
-
var panelNode = (0, _adfSchema.
|
|
58
|
+
var panelNode = (0, _adfSchema.panel)(!!options.allowCustomPanel);
|
|
59
59
|
return [{
|
|
60
60
|
name: 'panel',
|
|
61
61
|
node: panelNode
|
|
@@ -148,7 +148,7 @@ var panelPlugin = function panelPlugin() {
|
|
|
148
148
|
}
|
|
149
149
|
}];
|
|
150
150
|
|
|
151
|
-
if (options.
|
|
151
|
+
if (options.allowCustomPanel && options.allowCustomPanelEdit) {
|
|
152
152
|
quickInsertOptions.push({
|
|
153
153
|
id: 'custompanel',
|
|
154
154
|
title: formatMessage(_messages.messages.customPanel),
|
|
@@ -161,7 +161,7 @@ var panelPlugin = function panelPlugin() {
|
|
|
161
161
|
return insertPanelTypeWithAnalytics({
|
|
162
162
|
panelType: _adfSchema.PanelType.CUSTOM,
|
|
163
163
|
panelIcon: ':rainbow:',
|
|
164
|
-
panelColor: _colors.
|
|
164
|
+
panelColor: _colors.T50
|
|
165
165
|
}, state, insert);
|
|
166
166
|
}
|
|
167
167
|
});
|
|
@@ -81,7 +81,7 @@ var PanelNodeView = /*#__PURE__*/function () {
|
|
|
81
81
|
this.view = view;
|
|
82
82
|
this.node = node;
|
|
83
83
|
|
|
84
|
-
var _DOMSerializer$render = _prosemirrorModel.DOMSerializer.renderSpec(document, (0, _utils.panelAttrsToDom)(node.attrs, pluginOptions.
|
|
84
|
+
var _DOMSerializer$render = _prosemirrorModel.DOMSerializer.renderSpec(document, (0, _utils.panelAttrsToDom)(node.attrs, pluginOptions.allowCustomPanel || false)),
|
|
85
85
|
dom = _DOMSerializer$render.dom,
|
|
86
86
|
contentDOM = _DOMSerializer$render.contentDOM;
|
|
87
87
|
|
|
@@ -98,7 +98,7 @@ var PanelNodeView = /*#__PURE__*/function () {
|
|
|
98
98
|
this.icon.contentEditable = 'false';
|
|
99
99
|
|
|
100
100
|
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(PanelIcon, {
|
|
101
|
-
allowCustomPanel: pluginOptions.
|
|
101
|
+
allowCustomPanel: pluginOptions.allowCustomPanel,
|
|
102
102
|
panelAttributes: node.attrs,
|
|
103
103
|
providerFactory: this.providerFactory
|
|
104
104
|
}), this.icon);
|
|
@@ -21,7 +21,7 @@ var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/warni
|
|
|
21
21
|
|
|
22
22
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/error"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _removeEmoji = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove-emoji"));
|
|
25
25
|
|
|
26
26
|
var _messages = _interopRequireDefault(require("../../messages"));
|
|
27
27
|
|
|
@@ -51,7 +51,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
51
51
|
|
|
52
52
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
53
53
|
|
|
54
|
-
var panelIconMap = (_panelIconMap = {}, (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.INFO, ':info:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.NOTE, ':note:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.WARNING, ':warning:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.ERROR, ':
|
|
54
|
+
var panelIconMap = (_panelIconMap = {}, (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.INFO, ':info:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.NOTE, ':note:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.WARNING, ':warning:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.ERROR, ':cross_mark:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.SUCCESS, ':check_mark:'), (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.TIP, ':tip:'), _panelIconMap);
|
|
55
55
|
exports.panelIconMap = panelIconMap;
|
|
56
56
|
|
|
57
57
|
var getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isCustomPanelEnabled, isCustomPanelEditable, providerFactory, activePanelType, activePanelColor, activePanelIcon) {
|
|
@@ -229,7 +229,7 @@ var getToolbarItems = function getToolbarItems(formatMessage, panelNodeType, isC
|
|
|
229
229
|
var removeEmojiButton = {
|
|
230
230
|
id: 'editor.panel.removeEmoji',
|
|
231
231
|
type: 'button',
|
|
232
|
-
icon:
|
|
232
|
+
icon: _removeEmoji.default,
|
|
233
233
|
onClick: removeEmoji(),
|
|
234
234
|
title: formatMessage(_messages.default.removeEmoji),
|
|
235
235
|
disabled: activePanelIcon ? false : true
|
|
@@ -270,9 +270,14 @@ var getToolbarConfig = function getToolbarConfig(state, intl) {
|
|
|
270
270
|
var _panelObject$node$att = panelObject.node.attrs,
|
|
271
271
|
panelType = _panelObject$node$att.panelType,
|
|
272
272
|
panelColor = _panelObject$node$att.panelColor,
|
|
273
|
-
panelIcon = _panelObject$node$att.panelIcon;
|
|
273
|
+
panelIcon = _panelObject$node$att.panelIcon;
|
|
274
274
|
|
|
275
|
-
var
|
|
275
|
+
var isStandardPanel = function isStandardPanel(panelType) {
|
|
276
|
+
return panelType !== _adfSchema.PanelType.CUSTOM ? panelType : undefined;
|
|
277
|
+
}; // force toolbar to be turned on
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
var items = getToolbarItems(formatMessage, nodeType, options.allowCustomPanel || false, options.allowCustomPanel && options.allowCustomPanelEdit || false, providerFactory, panelType, options.allowCustomPanel ? panelColor : undefined, options.allowCustomPanel ? panelIcon || isStandardPanel(panelType) : undefined);
|
|
276
281
|
|
|
277
282
|
var getDomRef = function getDomRef(editorView) {
|
|
278
283
|
var domAtPos = editorView.domAtPos.bind(editorView);
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.panelAttrsToDom = exports.findPanel = void 0;
|
|
7
9
|
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
8
12
|
var _prosemirrorUtils = require("prosemirror-utils");
|
|
9
13
|
|
|
10
14
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
15
|
|
|
12
16
|
var _editorCommon = require("@atlaskit/editor-common");
|
|
13
17
|
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
21
|
+
|
|
14
22
|
var findPanel = function findPanel(state, selection) {
|
|
15
23
|
var panel = state.schema.nodes.panel;
|
|
16
24
|
return (0, _prosemirrorUtils.findSelectedNodeOfType)(panel)(selection || state.selection) || (0, _prosemirrorUtils.findParentNodeOfType)(panel)(selection || state.selection);
|
|
@@ -30,6 +38,13 @@ var panelAttrsToDom = function panelAttrsToDom(attrs, allowCustomPanel) {
|
|
|
30
38
|
'data-panel-type': panelType || _adfSchema.PanelType.INFO,
|
|
31
39
|
style: style
|
|
32
40
|
};
|
|
41
|
+
|
|
42
|
+
if (panelColor && isCustomPanel) {
|
|
43
|
+
panelAttrs = _objectSpread(_objectSpread({}, panelAttrs), {}, {
|
|
44
|
+
'data-panel-color': panelColor
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
33
48
|
var iconDiv = ['div', {
|
|
34
49
|
class: _editorCommon.PanelSharedCssClassName.icon
|
|
35
50
|
}];
|
package/dist/cjs/plugins/rank.js
CHANGED
|
@@ -12,9 +12,10 @@ var _default = {
|
|
|
12
12
|
// https://product-fabric.atlassian.net/wiki/spaces/E/pages/1113098008/Selection+Guide#Special-Cases
|
|
13
13
|
'expandKeymap', 'tableSelectionKeymap', 'tableKeymap', 'captionKeymap', // selection keymap needs to be above gap cursor keymap so it can set node selections from
|
|
14
14
|
// left/right arrows
|
|
15
|
-
'selectionKeymap', 'gapCursorKeymap', 'gapCursor', 'syncUrlText', 'fakeCursorToolbarPlugin', 'hyperLink', 'table', 'tableDecorations', 'hyperlinkInputRule', 'tablePMColResizing', 'hyperlinkKeymap', 'tableColResizing', 'undoRedoKeyMap', 'blockTypeKeyMap', 'tableEditing', 'filterStepsPlugin', 'pmCollab', 'collab', 'ruleInputRule', 'ruleKeymap', 'panel', 'media', 'mediaKeymap', 'mediaSingleKeymap', 'mediaEditor', 'unsupportedContent', 'jiraIssue', 'fakeTextCursor', 'helpDialog', 'helpDialogKeymap', 'macro', 'expand', 'extension', 'layout', 'contextPanel', 'floatingToolbar', 'clearMarksOnChange', 'reactNodeView', 'history', 'undoRedoPlugin', 'codeBlockIndent', 'placeholder', 'width', 'maxContentSize', 'multilineContent', 'grid', 'mobileDimensions', 'scrollGutterPlugin', 'analytics', 'findReplace', 'selection', 'avatarGroup', 'viewUpdateSubscription', 'inlineCode'],
|
|
15
|
+
'selectionKeymap', 'gapCursorKeymap', 'gapCursor', 'syncUrlText', 'fakeCursorToolbarPlugin', 'hyperLink', 'table', 'tableDecorations', 'hyperlinkInputRule', 'tablePMColResizing', 'hyperlinkKeymap', 'tableColResizing', 'undoRedoKeyMap', 'blockTypeKeyMap', 'tableEditing', 'filterStepsPlugin', 'pmCollab', 'collab', 'ruleInputRule', 'ruleKeymap', 'panel', 'media', 'mediaKeymap', 'mediaSingleKeymap', 'mediaEditor', 'unsupportedContent', 'jiraIssue', 'fakeTextCursor', 'helpDialog', 'helpDialogKeymap', 'macro', 'expand', 'extension', 'layout', 'contextPanel', 'floatingToolbar', 'clearMarksOnChange', 'reactNodeView', 'history', 'undoRedoPlugin', 'codeBlockIndent', 'placeholder', 'width', 'maxContentSize', 'multilineContent', 'grid', 'mobileDimensions', 'scrollGutterPlugin', 'analytics', 'findReplace', 'selection', 'avatarGroup', 'viewUpdateSubscription', 'beforePrimaryToolbar', 'inlineCode'],
|
|
16
16
|
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'rule', 'panel', 'mention', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'unsupportedBlock', 'unsupportedInline', 'confluenceJiraIssue', 'hardBreak', 'emoji', 'placeholder', 'mediaSingle', 'mediaGroup', 'table', 'expand', 'nestedExpand', 'media', 'tableHeader', 'decisionList', 'tableRow', 'decisionItem', 'tableCell', 'taskList', 'taskItem', 'extension', 'bodiedExtension', 'inlineExtension', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard'],
|
|
17
|
-
marks: [//
|
|
17
|
+
marks: [// Fragment mark is both for inline and block elements
|
|
18
|
+
'fragment', // Inline marks
|
|
18
19
|
'link', 'em', 'strong', 'textColor', 'strike', 'subsup', 'underline', 'code', 'typeAheadQuery', // Block marks
|
|
19
20
|
'alignment', 'breakout', 'indentation', 'annotation', //Unsupported mark
|
|
20
21
|
'unsupportedMark', 'unsupportedNodeAttribute']
|
|
@@ -26,6 +26,28 @@ var getInitialState = function getInitialState(state) {
|
|
|
26
26
|
|
|
27
27
|
exports.getInitialState = getInitialState;
|
|
28
28
|
|
|
29
|
+
var toggleContentEditable = function toggleContentEditable(node) {
|
|
30
|
+
var root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
31
|
+
|
|
32
|
+
if (root || node.getAttribute('contenteditable') === 'true') {
|
|
33
|
+
var wasTrue = node.getAttribute('contenteditable') === 'true';
|
|
34
|
+
node.setAttribute('contenteditable', 'false');
|
|
35
|
+
requestAnimationFrame(function () {
|
|
36
|
+
if (wasTrue) {
|
|
37
|
+
node.setAttribute('contenteditable', 'true');
|
|
38
|
+
} else {
|
|
39
|
+
node.removeAttribute('contenteditable');
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
} // any children with contenteditable = true block selection from proceeding
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
var children = Array.from(node.children);
|
|
46
|
+
children.forEach(function (child) {
|
|
47
|
+
return toggleContentEditable(child);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
29
51
|
var createPlugin = function createPlugin(dispatch, dispatchAnalyticsEvent) {
|
|
30
52
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
31
53
|
return new _prosemirrorState.Plugin({
|
|
@@ -108,10 +130,11 @@ var createPlugin = function createPlugin(dispatch, dispatchAnalyticsEvent) {
|
|
|
108
130
|
return false;
|
|
109
131
|
},
|
|
110
132
|
keydown: function keydown(editorView, event) {
|
|
111
|
-
// Firefox bugfix to bypass issue with editing text adjacent to a DOM node with
|
|
133
|
+
var state = editorView.state; // Firefox bugfix to bypass issue with editing text adjacent to a DOM node with
|
|
112
134
|
// contenteditable="false". (See https://product-fabric.atlassian.net/browse/ED-9452)
|
|
113
135
|
// On keypress, if the head of cursor selection touches a node with contenteditable="false",
|
|
114
136
|
// we temporarily remove the attribute, wait one tick, then restore it with its original value.
|
|
137
|
+
|
|
115
138
|
if (_editorCommon.browser.gecko) {
|
|
116
139
|
var node = editorView.nodeDOM(editorView.state.selection.head);
|
|
117
140
|
|
|
@@ -121,6 +144,31 @@ var createPlugin = function createPlugin(dispatch, dispatchAnalyticsEvent) {
|
|
|
121
144
|
node.setAttribute('contenteditable', 'false');
|
|
122
145
|
});
|
|
123
146
|
}
|
|
147
|
+
} // Bugfix for block ReactNodeViews like table and extension
|
|
148
|
+
// They could not be selected with Shift + ArrowDown/ArrowUp
|
|
149
|
+
// Fixed when contenteditable = false, but then you couldn't edit their contents
|
|
150
|
+
// Therefore, briefly set contenteditable=false to allow the selection through, then set it back to true
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
if (event instanceof KeyboardEvent && event.shiftKey && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
|
|
154
|
+
var pos;
|
|
155
|
+
|
|
156
|
+
if (event.key === 'ArrowDown') {
|
|
157
|
+
pos = state.selection.$head.after();
|
|
158
|
+
} else {
|
|
159
|
+
pos = state.selection.$head.before() - 1; // block extensions only take up one position, dont need to get before()
|
|
160
|
+
|
|
161
|
+
if (!editorView.nodeDOM(pos)) {
|
|
162
|
+
pos = state.doc.resolve(pos).before();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
var _node = editorView.nodeDOM(pos);
|
|
167
|
+
|
|
168
|
+
if (_node instanceof HTMLDivElement && _node.className.includes('View-content-wrap') // class added by ReactNodeView
|
|
169
|
+
) {
|
|
170
|
+
toggleContentEditable(_node, true);
|
|
171
|
+
}
|
|
124
172
|
}
|
|
125
173
|
|
|
126
174
|
return false;
|
|
@@ -248,7 +248,8 @@ var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component) {
|
|
|
248
248
|
target = _this$props.target;
|
|
249
249
|
var _this$state3 = this.state,
|
|
250
250
|
color = _this$state3.color,
|
|
251
|
-
text = _this$state3.text
|
|
251
|
+
text = _this$state3.text,
|
|
252
|
+
localId = _this$state3.localId;
|
|
252
253
|
return target && /*#__PURE__*/_react.default.createElement(PopupWithListeners, {
|
|
253
254
|
target: target,
|
|
254
255
|
offset: [0, 8],
|
|
@@ -265,7 +266,8 @@ var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component) {
|
|
|
265
266
|
onColorClick: this.onColorClick,
|
|
266
267
|
onColorHover: this.onColorHover,
|
|
267
268
|
onTextChanged: this.onTextChanged,
|
|
268
|
-
onEnter: this.onEnter
|
|
269
|
+
onEnter: this.onEnter,
|
|
270
|
+
localId: localId
|
|
269
271
|
})));
|
|
270
272
|
}
|
|
271
273
|
}]);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.addColumnAt = addColumnAt;
|
|
6
7
|
exports.createTable = exports.insertRow = exports.insertColumn = exports.addColumnAfter = exports.addColumnBefore = void 0;
|
|
7
8
|
|
|
8
9
|
var _prosemirrorState = require("prosemirror-state");
|
|
@@ -83,7 +83,8 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
83
83
|
return [{
|
|
84
84
|
name: 'table',
|
|
85
85
|
plugin: function plugin(_ref) {
|
|
86
|
-
var
|
|
86
|
+
var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
87
|
+
dispatch = _ref.dispatch,
|
|
87
88
|
portalProviderAPI = _ref.portalProviderAPI,
|
|
88
89
|
eventDispatcher = _ref.eventDispatcher;
|
|
89
90
|
|
|
@@ -94,7 +95,7 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
94
95
|
breakoutEnabled = _ref2.breakoutEnabled,
|
|
95
96
|
tableOptions = _ref2.tableOptions;
|
|
96
97
|
|
|
97
|
-
return (0, _main.createPlugin)(dispatch, portalProviderAPI, eventDispatcher, (0, _createPluginConfig.pluginConfig)(tableOptions), breakoutEnabled && dynamicSizingEnabled, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
|
|
98
|
+
return (0, _main.createPlugin)(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, (0, _createPluginConfig.pluginConfig)(tableOptions), breakoutEnabled && dynamicSizingEnabled, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
|
|
98
99
|
}
|
|
99
100
|
}, {
|
|
100
101
|
name: 'tablePMColResizing',
|
|
@@ -13,8 +13,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
13
13
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
|
|
16
|
-
var _editorCommon = require("@atlaskit/editor-common");
|
|
17
|
-
|
|
18
16
|
var _types = require("../types");
|
|
19
17
|
|
|
20
18
|
var _consts = require("../ui/consts");
|
|
@@ -72,7 +70,7 @@ var OverflowShadowsObserver = /*#__PURE__*/function () {
|
|
|
72
70
|
}, {
|
|
73
71
|
threshold: [0, 1],
|
|
74
72
|
root: _this.wrapper,
|
|
75
|
-
rootMargin: "0px ".concat(_consts.tableInsertColumnButtonSize / 2
|
|
73
|
+
rootMargin: "0px ".concat(_consts.tableInsertColumnButtonSize / 2, "px 0px 0px")
|
|
76
74
|
});
|
|
77
75
|
return;
|
|
78
76
|
}
|
|
@@ -50,7 +50,7 @@ var isDynamicTextSizingEnabled;
|
|
|
50
50
|
var isFullWidthModeEnabled;
|
|
51
51
|
var wasFullWidthModeEnabled;
|
|
52
52
|
|
|
53
|
-
var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispatcher, pluginConfig, dynamicTextSizing, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) {
|
|
53
|
+
var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig, dynamicTextSizing, breakoutEnabled, fullWidthModeEnabled, previousFullWidthModeEnabled) {
|
|
54
54
|
var _window;
|
|
55
55
|
|
|
56
56
|
isBreakoutEnabled = breakoutEnabled;
|
|
@@ -82,7 +82,9 @@ var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispa
|
|
|
82
82
|
tableHeader: function tableHeader(node, view, getPos) {
|
|
83
83
|
return new _tableCell.default(node, view, getPos, observer);
|
|
84
84
|
}
|
|
85
|
-
} : {};
|
|
85
|
+
} : {}; // Used to prevent invalid table cell spans being reported more than once per editor/document
|
|
86
|
+
|
|
87
|
+
var invalidTableIds = [];
|
|
86
88
|
return new _prosemirrorState.Plugin({
|
|
87
89
|
state: state,
|
|
88
90
|
key: _pluginFactory.pluginKey,
|
|
@@ -91,6 +93,27 @@ var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispa
|
|
|
91
93
|
return tr.getMeta('uiEvent') === 'cut';
|
|
92
94
|
});
|
|
93
95
|
|
|
96
|
+
function reportInvalidTableCellSpanAttrs(invalidNodeAttr) {
|
|
97
|
+
if (invalidTableIds.find(function (id) {
|
|
98
|
+
return id === invalidNodeAttr.tableLocalId;
|
|
99
|
+
})) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
invalidTableIds.push(invalidNodeAttr.tableLocalId);
|
|
104
|
+
dispatchAnalyticsEvent({
|
|
105
|
+
action: _analytics.ACTION.INVALID_DOCUMENT_ENCOUNTERED,
|
|
106
|
+
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
107
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
108
|
+
attributes: {
|
|
109
|
+
nodeType: invalidNodeAttr.nodeType,
|
|
110
|
+
reason: "".concat(invalidNodeAttr.attribute, ": ").concat(invalidNodeAttr.reason),
|
|
111
|
+
tableLocalId: invalidNodeAttr.tableLocalId,
|
|
112
|
+
spanValue: invalidNodeAttr.spanValue
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
94
117
|
if (tr) {
|
|
95
118
|
// "fixTables" removes empty rows as we don't allow that in schema
|
|
96
119
|
var updatedTr = (0, _eventHandlers.handleCut)(tr, oldState, newState);
|
|
@@ -100,7 +123,7 @@ var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispa
|
|
|
100
123
|
if (transactions.find(function (tr) {
|
|
101
124
|
return tr.docChanged;
|
|
102
125
|
})) {
|
|
103
|
-
return (0, _transforms.fixTables)(newState.tr);
|
|
126
|
+
return (0, _transforms.fixTables)(newState.tr, reportInvalidTableCellSpanAttrs);
|
|
104
127
|
}
|
|
105
128
|
},
|
|
106
129
|
view: function view(editorView) {
|