소스 검색

add comment

reiji-h 2 년 전
부모
커밋
df60df1bc7
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      packages/editor/src/components/playground/Playground.tsx

+ 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);
     });