瀏覽代碼

fix(editor): handle windows crlf in clipboard

Andelf 3 年之前
父節點
當前提交
0c19a02a2d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/frontend/handler/paste.cljs

+ 1 - 1
src/main/frontend/handler/paste.cljs

@@ -63,8 +63,8 @@
   [text e html]
   (util/stop e)
   (let [copied-blocks (state/get-copied-blocks)
-        copied-graph (:copy/graph copied-blocks)
         input (state/get-input)
+        text (string/replace text "\r\n" "\n") ;; Fix for Windows platform
         internal-paste? (and
                          (seq (:copy/blocks copied-blocks))
                          ;; not copied from the external clipboard