Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { forwardRef } from 'react';
import { Editor } from '@tinymce/tinymce-react';
import { FormControl, FormHelperText, InputLabel, useTheme } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';

import { useAfterInitialEffect, useConsolidatedRef, useUID } from '../../../hooks';

const useStyles = makeStyles(theme => ({
Expand Down Expand Up @@ -88,7 +87,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
initialValue={defaultValue}
disabled={disabled}
init={{
skin: 'oxide-dark', // or 'oxide' for light theme
skin: theme.palette.mode === 'dark' ? 'oxide-dark' : 'oxide',
// ...other TinyMCE config...
content_style: `
body {
Expand All @@ -110,6 +109,10 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
font-size: 1em;
font-family: inherit;
}
.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
color: ${theme.palette.text.secondary};
opacity: 0.7;
}
/* Add more styles as needed */
`,
placeholder,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk-components/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const darkTheme = createTheme({
},
background: {
// default: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',
paper: 'rgba(255, 255, 255, 0.1)' // card-bg
paper: '#18132c'
},
text: {
primary: '#e0e0e0', // text-light
Expand Down