{#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 showColorPicker}
{/if}
{#if isOwner} {:else if isShared} {/if} {#if !currentlyNew} {/if}
{#if showOverflowMenu && overflowBtnEl} {@const rect = overflowBtnEl.getBoundingClientRect()}
{#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}