e.stopPropagation()}
onkeydown={(e) => { 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}