diff --git a/src/renderer/src/components/RichEditor/styles.ts b/src/renderer/src/components/RichEditor/styles.ts index b184063d08..6acb943528 100644 --- a/src/renderer/src/components/RichEditor/styles.ts +++ b/src/renderer/src/components/RichEditor/styles.ts @@ -14,6 +14,31 @@ export const RichEditorWrapper = styled.div<{ border-radius: 6px; background: var(--color-background); overflow-y: hidden; + .ProseMirror table, + .tiptap table { + table-layout: auto !important; + } + + .ProseMirror table th, + .ProseMirror table td, + .tiptap th, + .tiptap td { + white-space: normal !important; + word-wrap: break-word !important; + word-break: break-word !important; + overflow-wrap: break-word !important; + overflow: visible !important; + text-overflow: clip !important; + } + + .ProseMirror table th > *, + .ProseMirror table td > *, + .tiptap td > *, + .tiptap th > * { + white-space: normal !important; + overflow: visible !important; + text-overflow: clip !important; + } width: ${({ $isFullWidth }) => ($isFullWidth ? '100%' : '60%')}; margin: ${({ $isFullWidth }) => ($isFullWidth ? '0' : '0 auto')}; font-family: ${({ $fontFamily }) => ($fontFamily === 'serif' ? 'var(--font-family-serif)' : 'var(--font-family)')}; @@ -21,6 +46,7 @@ export const RichEditorWrapper = styled.div<{ ${({ $minHeight }) => $minHeight && `min-height: ${$minHeight}px;`} ${({ $maxHeight }) => $maxHeight && `max-height: ${$maxHeight}px;`} + ` export const ToolbarWrapper = styled.div`