Skip to content

Commit 55bb509

Browse files
committed
Fix markdown editor styling
1 parent 2b998cc commit 55bb509

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.w-md-editor-text-pre > code,
2+
.w-md-editor-text-input,
3+
.wmde-markdown {
4+
font-size: 16px !important;
5+
line-height: 24px !important;
6+
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
7+
}

frontend/src/components/QuestionMarkdown/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import MDEditor, { commands } from "@uiw/react-md-editor";
22
import { Stack } from "@mui/material";
3+
import "./index.css";
34

45
interface QuestionMarkdownProps {
56
markdownText: string;
@@ -10,6 +11,9 @@ const QuestionMarkdown: React.FC<QuestionMarkdownProps> = ({ markdownText, setMa
1011
return (
1112
<Stack data-color-mode="light" paddingTop={2}>
1213
<MDEditor
14+
textareaProps={{
15+
placeholder: "Description",
16+
}}
1317
value={markdownText}
1418
onChange={(value) => setMarkdownText(value || "")}
1519
preview="edit"

frontend/src/pages/NewQuestion/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ const NewQuestion = () => {
7272
continue;
7373
}
7474

75+
const blob = new Blob([file], { type: file.type });
76+
77+
// this parts onwards should be in the backend...
7578
const storageRef = ref(storage, uuidv4());
76-
const uploadTask = uploadBytesResumable(storageRef, file);
79+
const uploadTask = uploadBytesResumable(storageRef, blob);
7780

7881
uploadTask.on(
7982
"state_changed",

0 commit comments

Comments
 (0)