feat: implement math rendering in HTML component and enhance drag handle visibility logic

This commit is contained in:
Rotimi Best
2026-03-12 06:44:56 +01:00
parent c87cc4b868
commit f3690c6746
6 changed files with 66 additions and 5 deletions
@@ -184,10 +184,9 @@ export function DragHandlePlugin(options: GlobalDragHandleOptions & { pluginKey:
function hideHandleOnEditorOut(event: MouseEvent) {
if (event.target instanceof Element) {
// Check if the relatedTarget class is still inside the editor
// Keep handle visible while cursor moves into editor descendants or handle children.
const relatedTarget = event.relatedTarget as HTMLElement;
const isInsideEditor =
relatedTarget?.classList.contains('tiptap') || relatedTarget?.classList.contains('drag-handle');
const isInsideEditor = !!relatedTarget?.closest('.tiptap, .drag-handle');
if (isInsideEditor) return;
}
@@ -102,7 +102,7 @@
pluginKey="link-bubble-menu"
{shouldShow}
class={cn(
'edra-bubble-menu ui:bg-popover ui:flex ui:h-fit ui:w-fit ui:items-center ui:rounded-lg ui:p-0.5',
'edra-bubble-menu ui:bg-popover ui:flex ui:h-fit ui:w-fit ui:items-center ui:rounded-lg ui:p-0.5 ui:shadow-lg',
className
)}
>