{#if activeImage && mathjaxElement} { placeHandle(false); await resetHandle(); }} on:moveoutend={async () => { placeHandle(true); await resetHandle(); }} on:blur={async () => { await resetHandle(); }} let:editor={mathjaxEditor} > { placeHandle(true); await resetHandle(); }} /> { isBlock = false; await updateBlockAttribute(); positionOverlay(); positionFloating(); }} on:setblock={async () => { isBlock = true; await updateBlockAttribute(); positionOverlay(); positionFloating(); }} on:delete={async () => { 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}