fix(editor): copy editor text with CRLF line endings on Windows

This commit is contained in:
Thanadon Kongkanun authored and GitHub committed 2026-09-24 12:09:10 +08:00
1 parent 417ce09de1
commit 42a1949bdc
5 files changed
+81

No files matched your search

@@ -8,6 +8,7 @@ import { useToast } from "@/composables/useToast";
import { useTheme } from "@/composables/useTheme";
import { useSettingsStore } from "@/stores/settingsStore";
import { loadEditorTheme, editorFontTheme } from "@/lib/editor/editorThemes";
import { editorClipboardLineEndingsExtension } from "@/lib/editor/editorClipboardLineEndings";
import { createDbxCodeMirrorSqlDialect } from "@/lib/editor/codemirrorSqlDialect";
import { copyToClipboard } from "@/lib/common/clipboard";
import { formatSqlForDisplay, type SqlFormatDialect } from "@/lib/sql/sqlFormatter";
@@ -208,6 +209,7 @@ async function initDdlEditor(content: string) {
},
}),
basicSetup,
editorClipboardLineEndingsExtension(EditorView),
EditorState.allowMultipleSelections.of(true),
langSql.sql({ dialect }),
themeExt,