visuddhinanda пре 3 година
родитељ
комит
5fcd409fca
1 измењених фајлова са 19 додато и 2 уклоњено
  1. 19 2
      dashboard/src/components/comment/CommentCreate.tsx

+ 19 - 2
dashboard/src/components/comment/CommentCreate.tsx

@@ -142,13 +142,30 @@ const Widget = ({
                 label={intl.formatMessage({ id: "forms.fields.content.label" })}
                 tooltip="可以直接粘贴屏幕截图"
               >
-                <ReactQuill theme="snow" style={{ height: 180 }} />
+                <ReactQuill
+                  theme="snow"
+                  style={{ height: 180 }}
+                  modules={{
+                    toolbar: [
+                      ["bold", "italic", "underline", "strike"],
+                      ["blockquote", "code-block"],
+                      [{ header: 1 }, { header: 2 }],
+                      [{ list: "ordered" }, { list: "bullet" }],
+                      [{ indent: "-1" }, { indent: "+1" }],
+                      [{ size: ["small", false, "large", "huge"] }],
+                      [{ header: [1, 2, 3, 4, 5, 6, false] }],
+                      ["link", "image", "video"],
+                      [{ color: [] }, { background: [] }],
+                      [{ font: [] }],
+                      [{ align: [] }],
+                    ],
+                  }}
+                />
               </Form.Item>
             ) : contentType === "markdown" ? (
               <Form.Item
                 name="content"
                 label={intl.formatMessage({ id: "forms.fields.content.label" })}
-                tooltip="可以直接粘贴屏幕截图"
               >
                 <MDEditor />
               </Form.Item>