Răsfoiți Sursa

add comment

reiji-h 2 ani în urmă
părinte
comite
df60df1bc7

+ 2 - 1
packages/editor/src/components/playground/Playground.tsx

@@ -38,9 +38,10 @@ export const Playground = (): JSX.Element => {
   }, [codeMirrorEditor]);
 
   // the upload event handler
+  // demo of uploading a file.
   const uploadHandler = useCallback((files: File[]) => {
     files.forEach((file) => {
-
+      // set dummy file name.
       const insertText = `[${file.name}](/attachment/aaaabbbbccccdddd)\n`;
       codeMirrorEditor?.insertText(insertText);
     });