{#if activeImage && mathjaxElement} { placeHandle(false); resetHandle(); }} on:moveoutend={() => { placeHandle(true); resetHandle(); }} on:close={resetHandle} let:editor={mathjaxEditor} > { placeHandle(true); resetHandle(); }} /> { isBlock = false; await updateBlockAttribute(); positionOverlay(); positionFloating(); }} on:setblock={async () => { isBlock = true; await updateBlockAttribute(); positionOverlay(); positionFloating(); }} on:delete={async () => { if (activeImage) { placeCaretAfter(activeImage); mathjaxElement?.remove(); clear(); } }} on:surround={async ({ detail }) => { const editor = await mathjaxEditor.editor; const { prefix, suffix } = detail; editor.replaceSelection( prefix + editor.getSelection() + suffix, ); }} /> {/if}