e.stopPropagation()} onkeydown={(e) => { e.stopPropagation(); handleKeydown(e); }} data-testid="note-editor" >
{#if checklistMode}
(content = c)} />
{:else if rawMarkdownMode} {:else} (content = md)} onEditor={(e) => (tiptapEditor = e)} onTransaction={() => editorTick++} placeholder="Add a crumb..." /> {/if}
{#if noteId && showImageUpload}
{:else if noteId && attachmentsList.length > 0}
{#each attachmentsList as attachment} {attachment.filename} { lightboxSrc = `/api/notes/${noteId}/attachments?attachmentId=${attachment.id}`; lightboxAlt = attachment.filename; }} data-testid="attachment-thumbnail" /> {/each}
{/if} {#if lightboxSrc} lightboxSrc = null} /> {/if} {#if !rawMarkdownMode && !checklistMode} {/if}
{#if showColorPicker}
{/if}