feat: Select article list in sight

This commit is contained in:
2025-05-31 06:35:05 +03:00
parent 5ef61bcef4
commit 2e6917406e
21 changed files with 899 additions and 498 deletions

View File

@ -2,58 +2,58 @@ import { styled } from "@mui/material/styles";
import SimpleMDE, { SimpleMDEReactProps } from "react-simplemde-editor";
import "easymde/dist/easymde.min.css";
const StyledMarkdownEditor = styled("div")(({ theme }) => ({
const StyledMarkdownEditor = styled("div")(() => ({
"& .editor-toolbar": {
backgroundColor: theme.palette.background.paper,
borderColor: theme.palette.divider,
backgroundColor: "inherit",
borderColor: "inherit",
},
"& .editor-toolbar button": {
color: theme.palette.text.primary,
color: "inherit",
},
"& .editor-toolbar button:hover": {
backgroundColor: theme.palette.action.hover,
backgroundColor: "inherit",
},
"& .editor-toolbar button:active, & .editor-toolbar button.active": {
backgroundColor: theme.palette.action.selected,
backgroundColor: "inherit",
},
"& .editor-statusbar": {
display: "none",
},
// Стили для самого редактора
"& .CodeMirror": {
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
borderColor: theme.palette.divider,
backgroundColor: "inherit",
color: "inherit",
borderColor: "inherit",
},
// Стили для текста в редакторе
"& .CodeMirror-selected": {
backgroundColor: `${theme.palette.action.selected} !important`,
backgroundColor: "inherit !important",
},
"& .CodeMirror-cursor": {
borderLeftColor: theme.palette.text.primary,
borderLeftColor: "inherit",
},
// Стили для markdown разметки
"& .cm-header": {
color: theme.palette.primary.main,
color: "inherit",
},
"& .cm-quote": {
color: theme.palette.text.secondary,
color: "inherit",
fontStyle: "italic",
},
"& .cm-link": {
color: theme.palette.primary.main,
color: "inherit",
},
"& .cm-url": {
color: theme.palette.secondary.main,
color: "inherit",
},
"& .cm-formatting": {
color: theme.palette.text.secondary,
color: "inherit",
},
"& .CodeMirror .editor-preview-full": {
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
borderColor: theme.palette.divider,
backgroundColor: "inherit",
color: "inherit",
borderColor: "inherit",
},
"& .EasyMDEContainer": {
@ -100,7 +100,8 @@ export const ReactMarkdownEditor = (props: SimpleMDEReactProps) => {
];
return (
<StyledMarkdownEditor
className="my-markdown-editor"
autoFocus={false}
spellCheck={false}
sx={{ marginTop: 1.5, marginBottom: 3 }}
>
<SimpleMDE {...props} />