From 9ca00bb1bf3df4a8f74ad6c36bac9285f9e27905 Mon Sep 17 00:00:00 2001 From: lqwakeup Date: Sun, 19 Dec 2021 16:57:00 +0800 Subject: [PATCH] fileupload --- web/public/icons/image.svg | 1 + web/src/components/Editor/Editor.tsx | 12 ++++++++++++ web/src/components/MemoEditor.tsx | 6 ++++++ web/src/less/editor.less | 13 ++++++++++++- 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 web/public/icons/image.svg diff --git a/web/public/icons/image.svg b/web/public/icons/image.svg new file mode 100644 index 000000000..4d5f44c81 --- /dev/null +++ b/web/public/icons/image.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/src/components/Editor/Editor.tsx b/web/src/components/Editor/Editor.tsx index 4a30d2596..b0a836fc1 100644 --- a/web/src/components/Editor/Editor.tsx +++ b/web/src/components/Editor/Editor.tsx @@ -21,9 +21,11 @@ interface Props { showConfirmBtn: boolean; showCancelBtn: boolean; showTools: boolean; + showFileUpload: boolean; onConfirmBtnClick: (content: string) => void; onCancelBtnClick: () => void; onContentChange: (content: string) => void; + onFileUpload: () => void; } // eslint-disable-next-line react/display-name @@ -38,9 +40,11 @@ const Editor = forwardRef((props: Props, ref: React.ForwardedRef(null); const tinyUndoRef = useRef(null); @@ -178,6 +182,14 @@ const Editor = forwardRef((props: Props, ref: React.ForwardedRef + +
+ + +
+