{#if !closing}
{ e.stopPropagation(); handleKeydown(e); }} data-testid="note-editor" >
{ if (e.key === 'Enter') { e.preventDefault(); if (textareaEl) textareaEl.focus(); else if (tiptapEditor) tiptapEditor.commands.focus('start'); } }} />
{#if checklistMode}
(content = c)} />
{:else if rawMarkdownMode} {:else} (content = md)} onEditor={(e) => (tiptapEditor = e)} onTransaction={() => editorTick++} placeholder="Add a crumb..." /> {/if}
{#if noteId && (showImageUpload || attachmentsList.length > 0)}
{/if} {#if !rawMarkdownMode && !checklistMode}
{/if}
{#if showOverflowMenu && overflowAnchorEl} {@const rect = overflowAnchorEl.getBoundingClientRect()} {@const isMobileTrigger = overflowAnchorEl === mobileOverflowBtnEl}
{#if isMobileTrigger}
Color { handleColorSelect(c); showOverflowMenu = false; }} />
{#if isOwner} {:else if isShared}
Shared note
{/if} {#if !currentlyNew} {/if}
{/if} {#if !checklistMode} {/if} {#if !currentlyNew} {/if} {#if !currentlyNew}
{/if} {#if checklistMode}
{#if hasDoneItems} {/if} {/if}
{/if} {/if}
{#if showShareDialog && noteId} (showShareDialog = false)} onUpdate={handleCollaboratorsUpdate} onShareUpdate={handleShareUpdate} /> {/if} {#if showHistory && noteId} (showHistory = false)} onRestored={handleHistoryRestored} /> {/if}