{#if hasPublicationHeader}

Publication Format Detected

You're using a publication format (document title with = or "index card"). This editor is for individual notes only. Use the Events form to create structured publications.

{ // Store the content in sessionStorage so it can be loaded in the Events form sessionStorage.setItem('zettelEditorContent', content); sessionStorage.setItem('zettelEditorSource', 'publication-format'); }} class="inline-flex items-center px-3 py-1.5 text-xs font-medium text-red-700 dark:text-red-300 bg-red-100 dark:bg-red-800 border border-red-200 dark:border-red-700 rounded-md hover:bg-red-200 dark:hover:bg-red-700 transition-colors" > Switch to Publication Editor
{:else} {#snippet title()}Note-Taking Tool{/snippet}

This editor is for creating individual notes (30041 events) only. Each section becomes a separate note event. You can add metadata like author, version, publication date, summary, and tags using AsciiDoc attributes. To create structured publications with a 30040 index event that ties multiple notes together, use the Events form.

{/if}
{#if showPreview && !hasPublicationHeader}
{#if !content.trim()}
Start typing to see the preview...
{:else}
{#each parsedSections as section, index}
{@html asciidoctor().convert(`== ${section.title}\n\n${section.content}`, { standalone:false, doctype:'article', attributes:{ showtitle:true, sectids:true } })}
{#if section.tags && section.tags.length > 0} {#each section.tags as tag}
{tag[0]}:{tag[1]}
{/each} {:else} No tags {/if}
{#if index < parsedSections.length - 1}
Event Boundary
{/if}
{/each}
Event Count: {parsedSections.length} event{parsedSections.length !== 1 ? 's' : ''}
{/if}
{/if}