소스 검색

fix: chart pasting not working due to removing tab characters (#5987)

David Luzar 2 년 전
부모
커밋
bdb14723b3
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/clipboard.ts

+ 2 - 2
src/clipboard.ts

@@ -8,7 +8,6 @@ import { tryParseSpreadsheet, Spreadsheet, VALID_SPREADSHEET } from "./charts";
 import { EXPORT_DATA_TYPES, MIME_TYPES } from "./constants";
 import { isInitializedImageElement } from "./element/typeChecks";
 import { isPromiseLike } from "./utils";
-import { normalizeText } from "./element/textElement";
 
 type ElementsClipboard = {
   type: typeof EXPORT_DATA_TYPES.excalidrawClipboard;
@@ -119,7 +118,7 @@ export const getSystemClipboard = async (
       : probablySupportsClipboardReadText &&
         (await navigator.clipboard.readText());
 
-    return normalizeText(text || "").trim();
+    return (text || "").trim();
   } catch {
     return "";
   }
@@ -148,6 +147,7 @@ export const parseClipboard = async (
   // technically possible it's staler than in-app clipboard
   const spreadsheetResult =
     !isPlainPaste && parsePotentialSpreadsheet(systemClipboard);
+
   if (spreadsheetResult) {
     return spreadsheetResult;
   }