fix(editor): Editor tooltip style is lost (no-changelog) (#18191)

This commit is contained in:
Suguru Inoue
2025-08-11 10:08:12 +02:00
committed by GitHub
parent 45a7175074
commit c3df5f24ff

View File

@@ -1,5 +1,6 @@
import { CODEMIRROR_TOOLTIP_CONTAINER_ELEMENT_ID } from '@/constants';
import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
import { EditorView } from '@codemirror/view';
import { EditorView, tooltips } from '@codemirror/view';
import { tags } from '@lezer/highlight';
/**
@@ -259,4 +260,7 @@ export const codeEditorTheme = ({ isReadOnly, minHeight, maxHeight, rows }: Them
},
}),
codeEditorSyntaxHighlighting,
tooltips({
parent: document.getElementById(CODEMIRROR_TOOLTIP_CONTAINER_ELEMENT_ID) ?? undefined,
}),
];