feat(editor): Enable drag and drop in code editors (Code/SQL/HTML) (#10888)

This commit is contained in:
Elias Meire
2024-09-25 15:25:26 +02:00
committed by GitHub
parent ed91495ebc
commit af9e227ad4
7 changed files with 173 additions and 34 deletions

View File

@@ -10,7 +10,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
import { createExpressionTelemetryPayload } from '@/utils/telemetryUtils';
import { useTelemetry } from '@/composables/useTelemetry';
import { dropInEditor } from '@/plugins/codemirror/dragAndDrop';
import { dropInExpressionEditor } from '@/plugins/codemirror/dragAndDrop';
import type { Segment } from '@/types/expressions';
import { startCompletion } from '@codemirror/autocomplete';
import type { EditorState, SelectionRange } from '@codemirror/state';
@@ -119,7 +119,7 @@ async function onDrop(value: string, event: MouseEvent) {
if (!editor) return;
const droppedSelection = await dropInEditor(toRaw(editor), event, value);
const droppedSelection = await dropInExpressionEditor(toRaw(editor), event, value);
if (!ndvStore.isMappingOnboarded) ndvStore.setMappingOnboarded();