reiji-h 2 лет назад
Родитель
Сommit
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]);
   }, [codeMirrorEditor]);
 
 
   // the upload event handler
   // the upload event handler
+  // demo of uploading a file.
   const uploadHandler = useCallback((files: File[]) => {
   const uploadHandler = useCallback((files: File[]) => {
     files.forEach((file) => {
     files.forEach((file) => {
-
+      // set dummy file name.
       const insertText = `[${file.name}](/attachment/aaaabbbbccccdddd)\n`;
       const insertText = `[${file.name}](/attachment/aaaabbbbccccdddd)\n`;
       codeMirrorEditor?.insertText(insertText);
       codeMirrorEditor?.insertText(insertText);
     });
     });