From 8b005c884cbe4649154b96a8a863a34eafea0eb4 Mon Sep 17 00:00:00 2001 From: boojack Date: Sun, 19 Dec 2021 21:29:24 +0800 Subject: [PATCH] update memo editor comman tool btns --- web/src/components/Editor/Editor.tsx | 31 +++++++++++++--------------- web/src/components/MemoEditor.tsx | 18 ++++++++++------ web/src/less/editor.less | 31 +++++++++++++++------------- 3 files changed, 43 insertions(+), 37 deletions(-) diff --git a/web/src/components/Editor/Editor.tsx b/web/src/components/Editor/Editor.tsx index b0a836fc1..48f096153 100644 --- a/web/src/components/Editor/Editor.tsx +++ b/web/src/components/Editor/Editor.tsx @@ -14,22 +14,22 @@ export interface EditorRefActions { getContent: () => string; } -interface Props { +export interface EditorProps { className: string; initialContent: string; placeholder: string; showConfirmBtn: boolean; showCancelBtn: boolean; showTools: boolean; - showFileUpload: boolean; onConfirmBtnClick: (content: string) => void; onCancelBtnClick: () => void; + onTagTextBtnClick: () => void; + onUploadFileBtnClick: () => void; onContentChange: (content: string) => void; - onFileUpload: () => void; } // eslint-disable-next-line react/display-name -const Editor = forwardRef((props: Props, ref: React.ForwardedRef) => { +const Editor = forwardRef((props: EditorProps, ref: React.ForwardedRef) => { const { globalState: { useTinyUndoHistoryCache }, } = useContext(appContext); @@ -40,11 +40,11 @@ const Editor = forwardRef((props: Props, ref: React.ForwardedRef(null); const tinyUndoRef = useRef(null); @@ -173,23 +173,20 @@ const Editor = forwardRef((props: Props, ref: React.ForwardedRef
- -
{/* nth */}
-
+
+ + <> + + + + +
- -
- - -
-