Skip to content

Commit

Permalink
Feat/1.2.1/UI (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuashuai authored Nov 24, 2023
1 parent d598b16 commit 5bc5f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/Editor/ToolBars/image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import { IEditorContext } from '../types';
import { uploadImage } from '@/services';

let context: IEditorContext;
const Image = () => {
const [editor, setEditor] = useState<Editor>(null);
const Image = ({ editorInstance }) => {
const [editor, setEditor] = useState<Editor>(editorInstance);
const { t } = useTranslation('translation', { keyPrefix: 'editor' });

const loadingText = `![${t('image.uploading')}...]()`;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const MDEditor: ForwardRefRenderFunction<EditorRef, Props> = (
<Code />
<LinkItem />
<BlockQuote />
<Image />
<Image editorInstance={editor} />
<Table />
<div className="toolbar-divider" />
<OL />
Expand Down

0 comments on commit 5bc5f3f

Please sign in to comment.