feat: Select article list in sight
This commit is contained in:
@ -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} />
|
||||
|
Reference in New Issue
Block a user