@pie-lib/editable-html-tip-tap 2.1.2-next.31 → 2.1.2-next.36
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.json +32 -0
- package/CHANGELOG.md +2532 -0
- package/LICENSE.md +5 -0
- package/lib/components/CharacterPicker.js +201 -0
- package/lib/components/CharacterPicker.js.map +1 -0
- package/lib/components/EditableHtml.js +376 -0
- package/lib/components/EditableHtml.js.map +1 -0
- package/lib/components/MenuBar.js +697 -0
- package/lib/components/MenuBar.js.map +1 -0
- package/lib/components/TiptapContainer.js +234 -0
- package/lib/components/TiptapContainer.js.map +1 -0
- package/lib/components/characters/characterUtils.js +378 -0
- package/lib/components/characters/characterUtils.js.map +1 -0
- package/lib/components/characters/custom-popper.js +44 -0
- package/lib/components/characters/custom-popper.js.map +1 -0
- package/lib/components/common/done-button.js +34 -0
- package/lib/components/common/done-button.js.map +1 -0
- package/lib/components/common/toolbar-buttons.js +144 -0
- package/lib/components/common/toolbar-buttons.js.map +1 -0
- package/lib/components/icons/CssIcon.js +25 -0
- package/lib/components/icons/CssIcon.js.map +1 -0
- package/lib/components/icons/RespArea.js +72 -0
- package/lib/components/icons/RespArea.js.map +1 -0
- package/lib/components/icons/TableIcons.js +53 -0
- package/lib/components/icons/TableIcons.js.map +1 -0
- package/lib/components/icons/TextAlign.js +157 -0
- package/lib/components/icons/TextAlign.js.map +1 -0
- package/lib/components/image/AltDialog.js +98 -0
- package/lib/components/image/AltDialog.js.map +1 -0
- package/lib/components/image/ImageToolbar.js +137 -0
- package/lib/components/image/ImageToolbar.js.map +1 -0
- package/lib/components/image/InsertImageHandler.js +135 -0
- package/lib/components/image/InsertImageHandler.js.map +1 -0
- package/lib/components/media/MediaDialog.js +594 -0
- package/lib/components/media/MediaDialog.js.map +1 -0
- package/lib/components/media/MediaToolbar.js +74 -0
- package/lib/components/media/MediaToolbar.js.map +1 -0
- package/lib/components/media/MediaWrapper.js +67 -0
- package/lib/components/media/MediaWrapper.js.map +1 -0
- package/lib/components/respArea/DragInTheBlank/DragInTheBlank.js +84 -0
- package/lib/components/respArea/DragInTheBlank/DragInTheBlank.js.map +1 -0
- package/lib/components/respArea/DragInTheBlank/choice.js +250 -0
- package/lib/components/respArea/DragInTheBlank/choice.js.map +1 -0
- package/lib/components/respArea/ExplicitConstructedResponse.js +137 -0
- package/lib/components/respArea/ExplicitConstructedResponse.js.map +1 -0
- package/lib/components/respArea/InlineDropdown.js +210 -0
- package/lib/components/respArea/InlineDropdown.js.map +1 -0
- package/lib/components/respArea/MathTemplated.js +130 -0
- package/lib/components/respArea/MathTemplated.js.map +1 -0
- package/lib/components/respArea/ToolbarIcon.js +81 -0
- package/lib/components/respArea/ToolbarIcon.js.map +1 -0
- package/lib/components/respArea/inlineDropdownUtils.js +67 -0
- package/lib/components/respArea/inlineDropdownUtils.js.map +1 -0
- package/lib/constants.js +11 -0
- package/lib/constants.js.map +1 -0
- package/lib/extensions/css.js +217 -0
- package/lib/extensions/css.js.map +1 -0
- package/lib/extensions/custom-toolbar-wrapper.js +92 -0
- package/lib/extensions/custom-toolbar-wrapper.js.map +1 -0
- package/lib/extensions/div-node.js +83 -0
- package/lib/extensions/div-node.js.map +1 -0
- package/lib/extensions/ensure-empty-root-div.js +48 -0
- package/lib/extensions/ensure-empty-root-div.js.map +1 -0
- package/lib/extensions/ensure-list-item-content-is-div.js +64 -0
- package/lib/extensions/ensure-list-item-content-is-div.js.map +1 -0
- package/lib/extensions/extended-list-item.js +15 -0
- package/lib/extensions/extended-list-item.js.map +1 -0
- package/lib/extensions/extended-table-cell.js +22 -0
- package/lib/extensions/extended-table-cell.js.map +1 -0
- package/lib/extensions/extended-table.js +75 -0
- package/lib/extensions/extended-table.js.map +1 -0
- package/lib/extensions/heading-paragraph.js +61 -0
- package/lib/extensions/heading-paragraph.js.map +1 -0
- package/lib/extensions/image-component.js +348 -0
- package/lib/extensions/image-component.js.map +1 -0
- package/lib/extensions/image.js +134 -0
- package/lib/extensions/image.js.map +1 -0
- package/lib/extensions/index.js +46 -0
- package/lib/extensions/index.js.map +1 -0
- package/lib/extensions/math.js +342 -0
- package/lib/extensions/math.js.map +1 -0
- package/lib/extensions/media.js +243 -0
- package/lib/extensions/media.js.map +1 -0
- package/lib/extensions/responseArea.js +446 -0
- package/lib/extensions/responseArea.js.map +1 -0
- package/lib/index.js +37 -0
- package/lib/index.js.map +1 -0
- package/lib/styles/editorContainerStyles.js +137 -0
- package/lib/styles/editorContainerStyles.js.map +1 -0
- package/lib/theme.js +8 -0
- package/lib/theme.js.map +1 -0
- package/lib/utils/helper.js +73 -0
- package/lib/utils/helper.js.map +1 -0
- package/lib/utils/size.js +26 -0
- package/lib/utils/size.js.map +1 -0
- package/lib/utils/toolbar.js +19 -0
- package/lib/utils/toolbar.js.map +1 -0
- package/package.json +24 -40
- package/src/__tests__/EditableHtml.test.jsx +554 -0
- package/src/__tests__/constants.test.js +19 -0
- package/src/__tests__/div-to-paragraph-conversion.test.jsx +125 -0
- package/src/__tests__/extensions.test.js +208 -0
- package/src/__tests__/index.test.jsx +154 -0
- package/src/__tests__/size-utils.test.js +64 -0
- package/src/__tests__/theme.test.js +17 -0
- package/src/components/CharacterPicker.jsx +207 -0
- package/src/components/EditableHtml.jsx +440 -0
- package/src/components/MenuBar.jsx +556 -0
- package/src/components/TiptapContainer.jsx +219 -0
- package/src/components/__tests__/AltDialog.test.jsx +147 -0
- package/src/components/__tests__/CharacterPicker.test.jsx +261 -0
- package/src/components/__tests__/CssIcon.test.jsx +46 -0
- package/src/components/__tests__/DragInTheBlank.test.jsx +255 -0
- package/src/components/__tests__/ExplicitConstructedResponse.test.jsx +209 -0
- package/src/components/__tests__/ImageToolbar.test.jsx +128 -0
- package/src/components/__tests__/InlineDropdown.test.jsx +393 -0
- package/src/components/__tests__/InsertImageHandler.test.js +161 -0
- package/src/components/__tests__/MediaDialog.test.jsx +293 -0
- package/src/components/__tests__/MediaToolbar.test.jsx +74 -0
- package/src/components/__tests__/MediaWrapper.test.jsx +81 -0
- package/src/components/__tests__/MenuBar.test.jsx +250 -0
- package/src/components/__tests__/RespArea.test.jsx +122 -0
- package/src/components/__tests__/TableIcons.test.jsx +149 -0
- package/src/components/__tests__/TextAlign.test.jsx +167 -0
- package/src/components/__tests__/TiptapContainer.test.jsx +138 -0
- package/src/components/__tests__/characterUtils.test.js +166 -0
- package/src/components/__tests__/choice.test.jsx +171 -0
- package/src/components/__tests__/custom-popper.test.jsx +82 -0
- package/src/components/__tests__/done-button.test.jsx +54 -0
- package/src/components/__tests__/toolbar-buttons.test.jsx +234 -0
- package/src/components/characters/characterUtils.js +447 -0
- package/src/components/characters/custom-popper.js +38 -0
- package/src/components/common/done-button.jsx +27 -0
- package/src/components/common/toolbar-buttons.jsx +122 -0
- package/src/components/icons/CssIcon.jsx +15 -0
- package/src/components/icons/RespArea.jsx +71 -0
- package/src/components/icons/TableIcons.jsx +52 -0
- package/src/components/icons/TextAlign.jsx +114 -0
- package/src/components/image/AltDialog.jsx +82 -0
- package/src/components/image/ImageToolbar.jsx +99 -0
- package/src/components/image/InsertImageHandler.js +107 -0
- package/src/components/media/MediaDialog.jsx +596 -0
- package/src/components/media/MediaToolbar.jsx +49 -0
- package/src/components/media/MediaWrapper.jsx +39 -0
- package/src/components/respArea/DragInTheBlank/DragInTheBlank.jsx +76 -0
- package/src/components/respArea/DragInTheBlank/choice.jsx +256 -0
- package/src/components/respArea/ExplicitConstructedResponse.jsx +136 -0
- package/src/components/respArea/InlineDropdown.jsx +221 -0
- package/src/components/respArea/MathTemplated.jsx +124 -0
- package/src/components/respArea/ToolbarIcon.jsx +66 -0
- package/src/components/respArea/__tests__/MathTemplated.test.jsx +210 -0
- package/src/components/respArea/inlineDropdownUtils.js +79 -0
- package/src/constants.js +5 -0
- package/src/extensions/__tests__/css.test.js +196 -0
- package/src/extensions/__tests__/custom-toolbar-wrapper.test.jsx +180 -0
- package/src/extensions/__tests__/divNode.test.js +87 -0
- package/src/extensions/__tests__/ensure-empty-root-div.test.js +57 -0
- package/src/extensions/__tests__/ensure-list-item-content-is-div.test.js +44 -0
- package/src/extensions/__tests__/extended-list-item.test.js +13 -0
- package/src/extensions/__tests__/extended-table-cell.test.js +22 -0
- package/src/extensions/__tests__/extended-table.test.js +183 -0
- package/src/extensions/__tests__/image-component.test.jsx +345 -0
- package/src/extensions/__tests__/image.test.js +237 -0
- package/src/extensions/__tests__/math.test.js +604 -0
- package/src/extensions/__tests__/media-node-view.test.jsx +298 -0
- package/src/extensions/__tests__/media.test.js +271 -0
- package/src/extensions/__tests__/responseArea.test.js +601 -0
- package/src/extensions/css.js +220 -0
- package/src/extensions/custom-toolbar-wrapper.jsx +78 -0
- package/src/extensions/div-node.js +86 -0
- package/src/extensions/ensure-empty-root-div.js +47 -0
- package/src/extensions/ensure-list-item-content-is-div.js +62 -0
- package/src/extensions/extended-list-item.js +10 -0
- package/src/extensions/extended-table-cell.js +19 -0
- package/src/extensions/extended-table.js +60 -0
- package/src/extensions/heading-paragraph.js +53 -0
- package/src/extensions/image-component.jsx +338 -0
- package/src/extensions/image.js +109 -0
- package/src/extensions/index.js +81 -0
- package/src/extensions/math.js +325 -0
- package/src/extensions/media.js +188 -0
- package/src/extensions/responseArea.js +401 -0
- package/src/index.jsx +5 -0
- package/src/styles/editorContainerStyles.js +145 -0
- package/src/theme.js +1 -0
- package/src/utils/__tests__/helper.test.js +126 -0
- package/src/utils/__tests__/toolbar.test.js +43 -0
- package/src/utils/helper.js +69 -0
- package/src/utils/size.js +32 -0
- package/src/utils/toolbar.js +15 -0
- package/dist/components/CharacterPicker.d.ts +0 -31
- package/dist/components/CharacterPicker.js +0 -131
- package/dist/components/EditableHtml.d.ts +0 -11
- package/dist/components/EditableHtml.js +0 -291
- package/dist/components/MenuBar.d.ts +0 -11
- package/dist/components/MenuBar.js +0 -462
- package/dist/components/TiptapContainer.d.ts +0 -11
- package/dist/components/TiptapContainer.js +0 -154
- package/dist/components/characters/characterUtils.d.ts +0 -35
- package/dist/components/characters/characterUtils.js +0 -465
- package/dist/components/characters/custom-popper.d.ts +0 -14
- package/dist/components/characters/custom-popper.js +0 -32
- package/dist/components/common/done-button.d.ts +0 -30
- package/dist/components/common/done-button.js +0 -26
- package/dist/components/common/toolbar-buttons.d.ts +0 -38
- package/dist/components/common/toolbar-buttons.js +0 -91
- package/dist/components/icons/CssIcon.d.ts +0 -11
- package/dist/components/icons/CssIcon.js +0 -14
- package/dist/components/icons/RespArea.d.ts +0 -26
- package/dist/components/icons/RespArea.js +0 -42
- package/dist/components/icons/TableIcons.d.ts +0 -14
- package/dist/components/icons/TableIcons.js +0 -32
- package/dist/components/icons/TextAlign.d.ts +0 -18
- package/dist/components/icons/TextAlign.js +0 -134
- package/dist/components/image/AltDialog.d.ts +0 -22
- package/dist/components/image/AltDialog.js +0 -61
- package/dist/components/image/ImageToolbar.d.ts +0 -24
- package/dist/components/image/ImageToolbar.js +0 -80
- package/dist/components/image/InsertImageHandler.d.ts +0 -32
- package/dist/components/image/InsertImageHandler.js +0 -53
- package/dist/components/media/MediaDialog.d.ts +0 -43
- package/dist/components/media/MediaDialog.js +0 -389
- package/dist/components/media/MediaToolbar.d.ts +0 -19
- package/dist/components/media/MediaToolbar.js +0 -41
- package/dist/components/media/MediaWrapper.d.ts +0 -19
- package/dist/components/respArea/DragInTheBlank/DragInTheBlank.d.ts +0 -23
- package/dist/components/respArea/DragInTheBlank/DragInTheBlank.js +0 -58
- package/dist/components/respArea/DragInTheBlank/choice.d.ts +0 -56
- package/dist/components/respArea/DragInTheBlank/choice.js +0 -156
- package/dist/components/respArea/ExplicitConstructedResponse.d.ts +0 -20
- package/dist/components/respArea/ExplicitConstructedResponse.js +0 -83
- package/dist/components/respArea/InlineDropdown.d.ts +0 -18
- package/dist/components/respArea/InlineDropdown.js +0 -119
- package/dist/components/respArea/MathTemplated.d.ts +0 -19
- package/dist/components/respArea/MathTemplated.js +0 -97
- package/dist/components/respArea/ToolbarIcon.d.ts +0 -14
- package/dist/components/respArea/ToolbarIcon.js +0 -17
- package/dist/components/respArea/inlineDropdownUtils.d.ts +0 -15
- package/dist/components/respArea/inlineDropdownUtils.js +0 -15
- package/dist/constants.d.ts +0 -13
- package/dist/constants.js +0 -4
- package/dist/extensions/css.d.ts +0 -11
- package/dist/extensions/css.js +0 -115
- package/dist/extensions/custom-toolbar-wrapper.d.ts +0 -11
- package/dist/extensions/custom-toolbar-wrapper.js +0 -61
- package/dist/extensions/div-node.d.ts +0 -10
- package/dist/extensions/div-node.js +0 -42
- package/dist/extensions/ensure-empty-root-div.d.ts +0 -14
- package/dist/extensions/ensure-empty-root-div.js +0 -24
- package/dist/extensions/ensure-list-item-content-is-div.d.ts +0 -15
- package/dist/extensions/ensure-list-item-content-is-div.js +0 -31
- package/dist/extensions/extended-list-item.d.ts +0 -13
- package/dist/extensions/extended-list-item.js +0 -5
- package/dist/extensions/extended-table-cell.d.ts +0 -10
- package/dist/extensions/extended-table-cell.js +0 -6
- package/dist/extensions/extended-table.d.ts +0 -17
- package/dist/extensions/extended-table.js +0 -34
- package/dist/extensions/heading-paragraph.d.ts +0 -17
- package/dist/extensions/heading-paragraph.js +0 -30
- package/dist/extensions/image-component.d.ts +0 -22
- package/dist/extensions/image-component.js +0 -220
- package/dist/extensions/image.d.ts +0 -10
- package/dist/extensions/image.js +0 -68
- package/dist/extensions/index.d.ts +0 -16
- package/dist/extensions/index.js +0 -64
- package/dist/extensions/math.d.ts +0 -15
- package/dist/extensions/math.js +0 -158
- package/dist/extensions/media.d.ts +0 -19
- package/dist/extensions/media.js +0 -149
- package/dist/extensions/responseArea.d.ts +0 -27
- package/dist/extensions/responseArea.js +0 -259
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -7
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -16
- package/dist/styles/editorContainerStyles.d.ts +0 -134
- package/dist/theme.d.ts +0 -9
- package/dist/utils/helper.d.ts +0 -9
- package/dist/utils/helper.js +0 -27
- package/dist/utils/size.d.ts +0 -9
- package/dist/utils/size.js +0 -14
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import React, { useMemo, useState } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
4
|
+
import { NodeSelection } from 'prosemirror-state';
|
|
5
|
+
|
|
6
|
+
import Bold from '@mui/icons-material/FormatBold';
|
|
7
|
+
import Italic from '@mui/icons-material/FormatItalic';
|
|
8
|
+
import Strikethrough from '@mui/icons-material/FormatStrikethrough';
|
|
9
|
+
import Code from '@mui/icons-material/Code';
|
|
10
|
+
import GridOn from '@mui/icons-material/GridOn';
|
|
11
|
+
import BulletedListIcon from '@mui/icons-material/FormatListBulleted';
|
|
12
|
+
import NumberedListIcon from '@mui/icons-material/FormatListNumbered';
|
|
13
|
+
import Underline from '@mui/icons-material/FormatUnderlined';
|
|
14
|
+
import Functions from '@mui/icons-material/Functions';
|
|
15
|
+
import ImageIcon from '@mui/icons-material/Image';
|
|
16
|
+
import Redo from '@mui/icons-material/Redo';
|
|
17
|
+
import Undo from '@mui/icons-material/Undo';
|
|
18
|
+
import FormatQuote from '@mui/icons-material/FormatQuote';
|
|
19
|
+
import TheatersIcon from '@mui/icons-material/Theaters';
|
|
20
|
+
import VolumeUpIcon from '@mui/icons-material/VolumeUp';
|
|
21
|
+
import BorderAll from '@mui/icons-material/BorderAll';
|
|
22
|
+
import Delete from '@mui/icons-material/Delete';
|
|
23
|
+
|
|
24
|
+
import { useEditorState } from '@tiptap/react';
|
|
25
|
+
|
|
26
|
+
import { PIE_TOOLBAR__CLASS } from '../constants';
|
|
27
|
+
import { ToolbarIcon } from './respArea/ToolbarIcon';
|
|
28
|
+
import { spanishConfig, specialConfig } from './characters/characterUtils';
|
|
29
|
+
import TextAlignIcon from './icons/TextAlign';
|
|
30
|
+
import CSSIcon from './icons/CssIcon';
|
|
31
|
+
import { AddColumn, AddRow, RemoveColumn, RemoveRow, RemoveTable } from './icons/TableIcons';
|
|
32
|
+
|
|
33
|
+
import { CharacterIcon, CharacterPicker } from './CharacterPicker';
|
|
34
|
+
import { DoneButton } from './common/done-button';
|
|
35
|
+
|
|
36
|
+
const SuperscriptIcon = () => (
|
|
37
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="none">
|
|
38
|
+
<path
|
|
39
|
+
d="M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z"
|
|
40
|
+
fill="currentColor"
|
|
41
|
+
/>
|
|
42
|
+
</svg>
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const SubscriptIcon = () => (
|
|
46
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="none">
|
|
47
|
+
<path
|
|
48
|
+
d="M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z"
|
|
49
|
+
fill="currentColor"
|
|
50
|
+
/>
|
|
51
|
+
</svg>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const HeadingIcon = () => (
|
|
55
|
+
<svg
|
|
56
|
+
width="30"
|
|
57
|
+
height="28"
|
|
58
|
+
viewBox="0 0 30 28"
|
|
59
|
+
fill="none"
|
|
60
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
61
|
+
style={{ width: '20px', height: '18px' }}
|
|
62
|
+
>
|
|
63
|
+
<path
|
|
64
|
+
d="M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z"
|
|
65
|
+
fill="currentColor"
|
|
66
|
+
/>
|
|
67
|
+
</svg>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
function MenuBar({
|
|
71
|
+
editor,
|
|
72
|
+
classes,
|
|
73
|
+
activePlugins,
|
|
74
|
+
toolbarOpts: toolOpts,
|
|
75
|
+
responseAreaProps,
|
|
76
|
+
onChange,
|
|
77
|
+
autoWidthToolbar,
|
|
78
|
+
}) {
|
|
79
|
+
const [showPicker, setShowPicker] = useState(false);
|
|
80
|
+
const toolbarOpts = toolOpts ?? {};
|
|
81
|
+
|
|
82
|
+
const editorState = useEditorState({
|
|
83
|
+
editor,
|
|
84
|
+
selector: (ctx) => {
|
|
85
|
+
const { selection } = ctx.editor?.state || {};
|
|
86
|
+
|
|
87
|
+
let currentNode;
|
|
88
|
+
|
|
89
|
+
if (!ctx.editor?.commandManager) {
|
|
90
|
+
return {};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (selection instanceof NodeSelection) {
|
|
94
|
+
currentNode = selection.node; // the selected node
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const hideDefaultToolbar =
|
|
98
|
+
ctx.editor?.isActive('math') ||
|
|
99
|
+
ctx.editor?.isActive('explicit_constructed_response') ||
|
|
100
|
+
ctx.editor?.isActive('imageUploadNode') ||
|
|
101
|
+
ctx.editor?.isActive('drag_in_the_blank');
|
|
102
|
+
|
|
103
|
+
const hasTextSelectionInTable = selection && selection.empty === false && ctx.editor.isActive('table');
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
currentNode,
|
|
107
|
+
hideDefaultToolbar,
|
|
108
|
+
hasTextSelectionInTable,
|
|
109
|
+
isFocused: ctx.editor?.isFocused,
|
|
110
|
+
toolbarOpened: ctx.editor?._toolbarOpened ?? false,
|
|
111
|
+
isBold: ctx.editor.isActive('bold') ?? false,
|
|
112
|
+
canBold: ctx.editor.can().chain().toggleBold().run() ?? false,
|
|
113
|
+
isTable: ctx.editor.isActive('table') ?? false,
|
|
114
|
+
tableHasBorder: ctx.editor.getAttributes('table')?.border === '1' ?? false,
|
|
115
|
+
canTable: ctx.editor.can().chain().insertTable().run() ?? false,
|
|
116
|
+
isItalic: ctx.editor.isActive('italic') ?? false,
|
|
117
|
+
canItalic: ctx.editor.can().chain().toggleItalic().run() ?? false,
|
|
118
|
+
isStrike: ctx.editor.isActive('strike') ?? false,
|
|
119
|
+
canStrike: ctx.editor.can().chain().toggleStrike().run() ?? false,
|
|
120
|
+
isCode: ctx.editor.isActive('code') ?? false,
|
|
121
|
+
canCode: ctx.editor.can().chain().toggleCode().run() ?? false,
|
|
122
|
+
canClearMarks: ctx.editor.can().chain().unsetAllMarks().run() ?? false,
|
|
123
|
+
isUnderline: ctx.editor.isActive('underline') ?? false,
|
|
124
|
+
isSubScript: ctx.editor.isActive('subscript') ?? false,
|
|
125
|
+
isSuperScript: ctx.editor.isActive('superscript') ?? false,
|
|
126
|
+
isParagraph: ctx.editor.isActive('paragraph') ?? false,
|
|
127
|
+
isHeading1: ctx.editor.isActive('heading', { level: 1 }) ?? false,
|
|
128
|
+
isHeading2: ctx.editor.isActive('heading', { level: 2 }) ?? false,
|
|
129
|
+
isHeading3: ctx.editor.isActive('heading', { level: 3 }) ?? false,
|
|
130
|
+
isHeadingParagraph: ctx.editor.isActive('headingParagraph') ?? false,
|
|
131
|
+
isHeading4: ctx.editor.isActive('heading', { level: 4 }) ?? false,
|
|
132
|
+
isHeading5: ctx.editor.isActive('heading', { level: 5 }) ?? false,
|
|
133
|
+
isHeading6: ctx.editor.isActive('heading', { level: 6 }) ?? false,
|
|
134
|
+
isBulletList: ctx.editor.isActive('bulletList') ?? false,
|
|
135
|
+
isOrderedList: ctx.editor.isActive('orderedList') ?? false,
|
|
136
|
+
isCodeBlock: ctx.editor.isActive('codeBlock') ?? false,
|
|
137
|
+
isBlockquote: ctx.editor.isActive('blockquote') ?? false,
|
|
138
|
+
canUndo: ctx.editor.can().chain().undo().run() ?? false,
|
|
139
|
+
canRedo: ctx.editor.can().chain().redo().run() ?? false,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const hasDoneButton = false;
|
|
145
|
+
const autoWidth = !!autoWidthToolbar;
|
|
146
|
+
|
|
147
|
+
const names = classNames(classes.toolbar, PIE_TOOLBAR__CLASS, {
|
|
148
|
+
[classes.toolbarWithNoDone]: !hasDoneButton,
|
|
149
|
+
[classes.toolbarTop]: toolbarOpts.position === 'top',
|
|
150
|
+
[classes.toolbarRight]: toolbarOpts.alignment === 'right',
|
|
151
|
+
[classes.focused]:
|
|
152
|
+
toolbarOpts.alwaysVisible ||
|
|
153
|
+
(editorState.isFocused && !editorState.toolbarOpened && !editorState.hideDefaultToolbar),
|
|
154
|
+
[classes.autoWidth]: autoWidth,
|
|
155
|
+
[classes.fullWidth]: !autoWidth,
|
|
156
|
+
[classes.hidden]: toolbarOpts.isHidden === true,
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
const customStyles = toolbarOpts.minWidth !== undefined ? { minWidth: toolbarOpts.minWidth } : {};
|
|
160
|
+
|
|
161
|
+
const handleMouseDown = (e) => {
|
|
162
|
+
e.preventDefault();
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const toolbarButtons = useMemo(
|
|
166
|
+
() => [
|
|
167
|
+
{
|
|
168
|
+
icon: <GridOn />,
|
|
169
|
+
onClick: (editor) => editor.chain().focus().insertTable({ rows: 2, cols: 2, withHeaderRow: false }).run(),
|
|
170
|
+
hidden: (state) => !activePlugins?.includes('table') || state.isTable,
|
|
171
|
+
isActive: (state) => state.isTable,
|
|
172
|
+
isDisabled: (state) => !state.canTable,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
icon: <AddRow />,
|
|
176
|
+
onClick: (editor) => editor.chain().focus().addRowAfter().run(),
|
|
177
|
+
hidden: (state) => !(state.isTable && !state.hasTextSelectionInTable),
|
|
178
|
+
isActive: (state) => state.isTable,
|
|
179
|
+
isDisabled: (state) => !state.canTable,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
icon: <RemoveRow />,
|
|
183
|
+
onClick: (editor) => editor.chain().focus().deleteRow().run(),
|
|
184
|
+
hidden: (state) => !(state.isTable && !state.hasTextSelectionInTable),
|
|
185
|
+
isActive: (state) => state.isTable,
|
|
186
|
+
isDisabled: (state) => !state.canTable,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
icon: <AddColumn />,
|
|
190
|
+
onClick: (editor) => editor.chain().focus().addColumnAfter().run(),
|
|
191
|
+
hidden: (state) => !(state.isTable && !state.hasTextSelectionInTable),
|
|
192
|
+
isActive: (state) => state.isTable,
|
|
193
|
+
isDisabled: (state) => !state.canTable,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
icon: <RemoveColumn />,
|
|
197
|
+
onClick: (editor) => editor.chain().focus().deleteColumn().run(),
|
|
198
|
+
hidden: (state) => !(state.isTable && !state.hasTextSelectionInTable),
|
|
199
|
+
isActive: (state) => state.isTable,
|
|
200
|
+
isDisabled: (state) => !state.canTable,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
icon: <RemoveTable />,
|
|
204
|
+
onClick: (editor) => editor.chain().focus().deleteTable().run(),
|
|
205
|
+
hidden: (state) => !(state.isTable && !state.hasTextSelectionInTable),
|
|
206
|
+
isActive: (state) => state.isTable,
|
|
207
|
+
isDisabled: (state) => !state.canTable,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
icon: <BorderAll />,
|
|
211
|
+
onClick: (editor) => {
|
|
212
|
+
const tableAttrs = editor.getAttributes('table');
|
|
213
|
+
|
|
214
|
+
const update = {
|
|
215
|
+
...tableAttrs,
|
|
216
|
+
border: tableAttrs.border !== '0' ? '0' : '1',
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
editor.commands.updateAttributes('table', update);
|
|
220
|
+
},
|
|
221
|
+
hidden: (state) => !(state.isTable && !state.hasTextSelectionInTable),
|
|
222
|
+
isActive: (state) => state.tableHasBorder,
|
|
223
|
+
isDisabled: (state) => !state.canTable,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
icon: <Bold />,
|
|
227
|
+
onClick: (editor) => editor.chain().focus().toggleBold().run(),
|
|
228
|
+
hidden: () => !activePlugins?.includes('bold'),
|
|
229
|
+
isActive: (state) => state.isBold,
|
|
230
|
+
isDisabled: (state) => !state.canBold,
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
icon: <Italic />,
|
|
234
|
+
onClick: (editor) => editor.chain().focus().toggleItalic().run(),
|
|
235
|
+
hidden: () => !activePlugins?.includes('italic'),
|
|
236
|
+
isActive: (state) => state.isItalic,
|
|
237
|
+
isDisabled: (state) => !state.canItalic,
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
icon: <Strikethrough />,
|
|
241
|
+
onClick: (editor) => editor.chain().focus().toggleStrike().run(),
|
|
242
|
+
hidden: () => !activePlugins?.includes('strikethrough'),
|
|
243
|
+
isActive: (state) => state.isStrike,
|
|
244
|
+
isDisabled: (state) => !state.canStrike,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
icon: <Code />,
|
|
248
|
+
onClick: (editor) => editor.chain().focus().toggleCode().run(),
|
|
249
|
+
hidden: () => !activePlugins?.includes('code'),
|
|
250
|
+
isActive: (state) => state.isCode,
|
|
251
|
+
isDisabled: (state) => !state.canCode,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
icon: <Underline />,
|
|
255
|
+
onClick: (editor) => editor.chain().focus().toggleUnderline().run(),
|
|
256
|
+
hidden: () => !activePlugins?.includes('underline'),
|
|
257
|
+
isActive: (state) => state.isUnderline,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
icon: <SubscriptIcon />,
|
|
261
|
+
onClick: (editor) => editor.chain().focus().toggleSubscript().run(),
|
|
262
|
+
hidden: () => !activePlugins?.includes('subscript'),
|
|
263
|
+
isActive: (state) => state.isSubScript,
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
icon: <SuperscriptIcon />,
|
|
267
|
+
onClick: (editor) => editor.chain().focus().toggleSuperscript().run(),
|
|
268
|
+
hidden: () => !activePlugins?.includes('superscript'),
|
|
269
|
+
isActive: (state) => state.isSuperScript,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
icon: <ImageIcon />,
|
|
273
|
+
hidden: () => !activePlugins?.includes('image'),
|
|
274
|
+
onClick: (editor) => editor.chain().focus().setImageUploadNode().run(),
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
icon: <TheatersIcon />,
|
|
278
|
+
hidden: () => !activePlugins?.includes('video'),
|
|
279
|
+
onClick: (editor) => editor.chain().focus().insertMedia({ type: 'video' }).run(),
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
icon: <VolumeUpIcon />,
|
|
283
|
+
hidden: () => !activePlugins?.includes('audio'),
|
|
284
|
+
onClick: (editor) => editor.chain().focus().insertMedia({ type: 'audio', tag: 'audio' }).run(),
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
icon: <CSSIcon />,
|
|
288
|
+
hidden: () => !activePlugins?.includes('css'),
|
|
289
|
+
onClick: (editor) => editor.commands.openCSSClassDialog(),
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
icon: <FormatQuote />,
|
|
293
|
+
hidden: () => !activePlugins?.includes('blockquote'),
|
|
294
|
+
onClick: (editor) => editor.chain().focus().toggleBlockquote().run(),
|
|
295
|
+
isActive: (state) => state.isBlockquote,
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
icon: <HeadingIcon />,
|
|
299
|
+
hidden: () => !activePlugins?.includes('h3'),
|
|
300
|
+
onClick: (editor) => editor.chain().focus().toggleHeadingParagraph().run(),
|
|
301
|
+
isActive: (state) => state.isHeadingParagraph,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
icon: <Functions />,
|
|
305
|
+
hidden: () => !activePlugins?.includes('math'),
|
|
306
|
+
onClick: (editor) => editor.chain().focus().insertMath('').run(),
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
icon: <CharacterIcon letter="ñ" />,
|
|
310
|
+
hidden: () => !activePlugins?.includes('languageCharacters'),
|
|
311
|
+
onClick: () => setShowPicker(spanishConfig),
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
icon: <CharacterIcon letter="€" />,
|
|
315
|
+
hidden: () => activePlugins?.filter((p) => p === 'languageCharacters').length !== 2,
|
|
316
|
+
onClick: () => setShowPicker(specialConfig),
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
icon: <TextAlignIcon editor={editor} />,
|
|
320
|
+
hidden: () => !activePlugins?.includes('text-align'),
|
|
321
|
+
onClick: () => {},
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
icon: <BulletedListIcon />,
|
|
325
|
+
hidden: () => !activePlugins?.includes('bulleted-list'),
|
|
326
|
+
onClick: (editor) => editor.chain().focus().toggleBulletList().run(),
|
|
327
|
+
isActive: (state) => state.isBulletList,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
icon: <NumberedListIcon />,
|
|
331
|
+
hidden: () => !activePlugins?.includes('numbered-list'),
|
|
332
|
+
onClick: (editor) => editor.chain().focus().toggleOrderedList().run(),
|
|
333
|
+
isActive: (state) => state.isOrderedList,
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
icon: <Undo />,
|
|
337
|
+
hidden: () => !activePlugins?.includes('undo'),
|
|
338
|
+
onClick: (editor) => editor.chain().focus().undo().run(),
|
|
339
|
+
isDisabled: (state) => !state.canUndo,
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
icon: <Redo />,
|
|
343
|
+
hidden: () => !activePlugins?.includes('redo'),
|
|
344
|
+
onClick: (editor) => editor.chain().focus().redo().run(),
|
|
345
|
+
isDisabled: (state) => !state.canRedo,
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
[activePlugins, editor],
|
|
349
|
+
);
|
|
350
|
+
|
|
351
|
+
const isDragInTheBlankSelected =
|
|
352
|
+
editorState.hideDefaultToolbar && editorState.currentNode?.type?.name === 'drag_in_the_blank';
|
|
353
|
+
|
|
354
|
+
return (
|
|
355
|
+
<div className={names} style={{ ...customStyles }} onMouseDown={handleMouseDown}>
|
|
356
|
+
{isDragInTheBlankSelected && (
|
|
357
|
+
<div className={classes.defaultToolbar} tabIndex="1">
|
|
358
|
+
<div className={classes.buttonsContainer}>
|
|
359
|
+
<button
|
|
360
|
+
type="button"
|
|
361
|
+
className={classes.button}
|
|
362
|
+
onClick={(e) => {
|
|
363
|
+
e.preventDefault();
|
|
364
|
+
editor.chain().focus().deleteSelection().run();
|
|
365
|
+
onChange?.(editor.getHTML());
|
|
366
|
+
}}
|
|
367
|
+
aria-label="Delete response area"
|
|
368
|
+
>
|
|
369
|
+
<Delete />
|
|
370
|
+
</button>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
)}
|
|
374
|
+
{!editorState.hideDefaultToolbar && (
|
|
375
|
+
<div className={classes.defaultToolbar} tabIndex="1">
|
|
376
|
+
<div className={classes.buttonsContainer}>
|
|
377
|
+
{toolbarButtons
|
|
378
|
+
.filter((btn) => !btn.hidden?.(editorState))
|
|
379
|
+
.map((btn, index) => {
|
|
380
|
+
const disabled = btn.isDisabled?.(editorState);
|
|
381
|
+
const active = btn.isActive?.(editorState);
|
|
382
|
+
|
|
383
|
+
return (
|
|
384
|
+
<button
|
|
385
|
+
key={index}
|
|
386
|
+
disabled={disabled}
|
|
387
|
+
onClick={(e) => {
|
|
388
|
+
e.preventDefault();
|
|
389
|
+
btn.onClick(editor);
|
|
390
|
+
}}
|
|
391
|
+
className={classNames(classes.button, { [classes.active]: active })}
|
|
392
|
+
>
|
|
393
|
+
{btn.icon}
|
|
394
|
+
</button>
|
|
395
|
+
);
|
|
396
|
+
})}
|
|
397
|
+
</div>
|
|
398
|
+
{activePlugins?.includes('responseArea') && (
|
|
399
|
+
<button
|
|
400
|
+
onClick={() => {
|
|
401
|
+
editor.chain().focus().insertResponseArea(responseAreaProps.type).run();
|
|
402
|
+
}}
|
|
403
|
+
className={classes.button}
|
|
404
|
+
>
|
|
405
|
+
<ToolbarIcon />
|
|
406
|
+
</button>
|
|
407
|
+
)}
|
|
408
|
+
|
|
409
|
+
{toolbarOpts.showDone && (
|
|
410
|
+
<DoneButton
|
|
411
|
+
onClick={() => {
|
|
412
|
+
onChange?.(editor.getHTML());
|
|
413
|
+
editor.commands.blur();
|
|
414
|
+
}}
|
|
415
|
+
/>
|
|
416
|
+
)}
|
|
417
|
+
</div>
|
|
418
|
+
)}
|
|
419
|
+
{showPicker && (
|
|
420
|
+
<CharacterPicker
|
|
421
|
+
editor={editor}
|
|
422
|
+
opts={{
|
|
423
|
+
...showPicker,
|
|
424
|
+
renderPopOver: (ev, ch) => console.log('Show popover', ch),
|
|
425
|
+
closePopOver: () => console.log('Close popover'),
|
|
426
|
+
}}
|
|
427
|
+
onClose={() => setShowPicker(false)}
|
|
428
|
+
/>
|
|
429
|
+
)}
|
|
430
|
+
</div>
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// Wrapper component that provides classes object using styled API
|
|
435
|
+
const StyledMenuBar = (props) => {
|
|
436
|
+
const theme = useTheme();
|
|
437
|
+
|
|
438
|
+
const classes = {
|
|
439
|
+
defaultToolbar: 'defaultToolbar',
|
|
440
|
+
buttonsContainer: 'buttonsContainer',
|
|
441
|
+
button: 'toolbarButton',
|
|
442
|
+
active: 'active',
|
|
443
|
+
disabled: 'disabled',
|
|
444
|
+
isActive: 'isActive',
|
|
445
|
+
toolbar: 'toolbar',
|
|
446
|
+
toolbarWithNoDone: 'toolbarWithNoDone',
|
|
447
|
+
toolbarTop: 'toolbarTop',
|
|
448
|
+
toolbarRight: 'toolbarRight',
|
|
449
|
+
fullWidth: 'fullWidth',
|
|
450
|
+
hidden: 'hidden',
|
|
451
|
+
autoWidth: 'autoWidth',
|
|
452
|
+
focused: 'focused',
|
|
453
|
+
iconRoot: 'iconRoot',
|
|
454
|
+
label: 'label',
|
|
455
|
+
shared: 'shared',
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
return (
|
|
459
|
+
<StyledMenuBarRoot>
|
|
460
|
+
<MenuBar {...props} classes={classes} />
|
|
461
|
+
</StyledMenuBarRoot>
|
|
462
|
+
);
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
const StyledMenuBarRoot = styled('div')(({ theme }) => ({
|
|
466
|
+
'& .defaultToolbar': {
|
|
467
|
+
display: 'flex',
|
|
468
|
+
width: '100%',
|
|
469
|
+
justifyContent: 'space-between',
|
|
470
|
+
},
|
|
471
|
+
'& .buttonsContainer': {
|
|
472
|
+
alignItems: 'center',
|
|
473
|
+
display: 'flex',
|
|
474
|
+
width: '100%',
|
|
475
|
+
},
|
|
476
|
+
'& .toolbarButton': {
|
|
477
|
+
color: 'grey',
|
|
478
|
+
display: 'inline-flex',
|
|
479
|
+
padding: '2px',
|
|
480
|
+
background: 'none',
|
|
481
|
+
border: 'none',
|
|
482
|
+
cursor: 'pointer',
|
|
483
|
+
'&:hover': {
|
|
484
|
+
color: 'black',
|
|
485
|
+
},
|
|
486
|
+
'&:focus': {
|
|
487
|
+
outline: `2px solid ${theme.palette.grey[700]}`,
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
'& .active': {
|
|
491
|
+
color: 'black',
|
|
492
|
+
},
|
|
493
|
+
'& .disabled': {
|
|
494
|
+
opacity: 0.7,
|
|
495
|
+
cursor: 'not-allowed',
|
|
496
|
+
'& :hover': {
|
|
497
|
+
color: 'grey',
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
'& .isActive': {
|
|
501
|
+
background: 'var(--purple)',
|
|
502
|
+
color: 'var(--white)',
|
|
503
|
+
},
|
|
504
|
+
'& .toolbar': {
|
|
505
|
+
position: 'absolute',
|
|
506
|
+
zIndex: 20,
|
|
507
|
+
cursor: 'pointer',
|
|
508
|
+
justifyContent: 'space-between',
|
|
509
|
+
background: 'var(--editable-html-toolbar-bg, #efefef)',
|
|
510
|
+
minWidth: '280px',
|
|
511
|
+
margin: '5px 0 0 0',
|
|
512
|
+
padding: '2px',
|
|
513
|
+
boxShadow:
|
|
514
|
+
'0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',
|
|
515
|
+
boxSizing: 'border-box',
|
|
516
|
+
display: 'flex',
|
|
517
|
+
opacity: 0,
|
|
518
|
+
pointerEvents: 'none',
|
|
519
|
+
},
|
|
520
|
+
'& .toolbarWithNoDone': {
|
|
521
|
+
minWidth: '265px',
|
|
522
|
+
},
|
|
523
|
+
'& .toolbarTop': {
|
|
524
|
+
top: '-45px',
|
|
525
|
+
},
|
|
526
|
+
'& .toolbarRight': {
|
|
527
|
+
right: 0,
|
|
528
|
+
},
|
|
529
|
+
'& .fullWidth': {
|
|
530
|
+
width: '100%',
|
|
531
|
+
},
|
|
532
|
+
'& .hidden': {
|
|
533
|
+
visibility: 'hidden',
|
|
534
|
+
},
|
|
535
|
+
'& .autoWidth': {
|
|
536
|
+
width: 'auto',
|
|
537
|
+
},
|
|
538
|
+
'& .focused': {
|
|
539
|
+
opacity: 1,
|
|
540
|
+
pointerEvents: 'auto',
|
|
541
|
+
},
|
|
542
|
+
'& .iconRoot': {
|
|
543
|
+
width: '28px',
|
|
544
|
+
height: '28px',
|
|
545
|
+
padding: '4px',
|
|
546
|
+
verticalAlign: 'top',
|
|
547
|
+
},
|
|
548
|
+
'& .label': {
|
|
549
|
+
color: 'var(--editable-html-toolbar-check, #00bb00)',
|
|
550
|
+
},
|
|
551
|
+
'& .shared': {
|
|
552
|
+
display: 'flex',
|
|
553
|
+
},
|
|
554
|
+
}));
|
|
555
|
+
|
|
556
|
+
export default StyledMenuBar;
|