Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: solve the problem that pictures cannot be uploaded through the clipboard

robin55b1d3032ea0
diff --git a/ui/src/components/Editor/ToolBars/image.tsx b/ui/src/components/Editor/ToolBars/image.tsx
index fdde738d..5f4475a2 100644
--- a/ui/src/components/Editor/ToolBars/image.tsx
+++ b/ui/src/components/Editor/ToolBars/image.tsx
@@ -105,7 +105,7 @@ const Image: FC<IEditorContext> = ({ editor }) => {
editor.replaceRange(text.join('\n'), startPos, endPos);
};
- const paste = async (event) => {
+ const paste = async (_, event) => {
const clipboard = event.clipboardData;
const bool = verifyImageSize(clipboard.files);